@utilix-tech/sdk 0.83.0 → 0.85.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 +2 -2
  3. package/dist/{chunk-IEPWZERQ.js → chunk-6EJVNQSY.js} +38 -1
  4. package/dist/{chunk-OFLNVDNX.js → chunk-BCISWFVJ.js} +50 -1
  5. package/dist/{chunk-QVOK3BXM.js → chunk-FB6CCFR5.js} +77 -1
  6. package/dist/{chunk-KXUHXQFO.js → chunk-RMXZMYSG.js} +107 -1
  7. package/dist/{code-COUhffgE.d.cts → code-mkKV7BQ4.d.cts} +33 -2
  8. package/dist/{code-COUhffgE.d.ts → code-mkKV7BQ4.d.ts} +33 -2
  9. package/dist/index.cjs +268 -0
  10. package/dist/index.d.cts +4 -4
  11. package/dist/index.d.ts +4 -4
  12. package/dist/index.js +4 -4
  13. package/dist/{text-CNn3whZA.d.ts → text-xY5MJwr0.d.cts} +34 -2
  14. package/dist/{text-CNn3whZA.d.cts → text-xY5MJwr0.d.ts} +34 -2
  15. package/dist/{time-KqJjdqII.d.cts → time-VMAy_SrV.d.cts} +22 -2
  16. package/dist/{time-KqJjdqII.d.ts → time-VMAy_SrV.d.ts} +22 -2
  17. package/dist/tools/code.cjs +106 -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/text.cjs +76 -0
  22. package/dist/tools/text.d.cts +1 -1
  23. package/dist/tools/text.d.ts +1 -1
  24. package/dist/tools/text.js +1 -1
  25. package/dist/tools/time.cjs +37 -0
  26. package/dist/tools/time.d.cts +1 -1
  27. package/dist/tools/time.d.ts +1 -1
  28. package/dist/tools/time.js +1 -1
  29. package/dist/tools/units.cjs +49 -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-D7YRRwei.d.cts → units-DwIvTP-X.d.cts} +27 -2
  34. package/dist/{units-D7YRRwei.d.ts → units-DwIvTP-X.d.ts} +27 -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.85.0
6
+ - Add `calculateCreditCardMinimumPayment` (credit-card-minimum-payment-calculator): simulate paying only the minimum payment on a revolving credit card balance, where the minimum is the larger of a percent of the balance or a fixed dollar floor, and report months/years to payoff, total interest, and total paid.
7
+ - Add `checkDashUsage` (em-dash-usage-checker): scan text for likely dash misuse: a hyphen surrounded by spaces, an unconverted double hyphen, and inconsistent spacing around em dashes across the same document.
8
+
9
+ ## 0.84.0
10
+ - Add `findCronOverlaps` (cron-overlap-detector): walk minute-by-minute over a window of days and flag every minute where two or more cron schedules fire at once, listing which expressions collided.
11
+ - Add `lintDockerfile` (dockerfile-linter): lint a Dockerfile for an unpinned or `:latest` base image, a final stage missing WORKDIR or USER, and ADD used on a plain local file where COPY would do.
12
+
5
13
  ## 0.83.0
6
14
  - Add `extractMarkdownLinkReferences` (markdown-link-reference-extractor): extract reference-style Markdown links (`[text][ref]`, the `[text][]` shortcut, and `![alt][ref]` image references) and match them against their `[ref]: url` definitions, flagging unresolved references and unused definitions.
7
15
  - Add `extractPromptTemplateVariables` (prompt-template-variable-extractor): extract `{{variable}}`-style placeholders from a prompt template, report occurrence counts, flag duplicates, and optionally cross-check against a list of provided variable names.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @utilix-tech/sdk
2
2
 
3
- **718 developer utility functions for Node.js: runs locally, no API key required.**
3
+ **722 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)
@@ -363,7 +363,7 @@ formatIso8601Duration(90061); // { iso: "P1DT1H1M1S", ... }
363
363
  ### `/units`: Conversions
364
364
 
365
365
  ```ts
366
- 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, validateVin, validateIsin, calculateLoanPrepaymentPenalty, calculateRealRateOfReturn } from "@utilix-tech/sdk/units";
366
+ 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, validateVin, validateIsin, calculateLoanPrepaymentPenalty, calculateRealRateOfReturn, calculateCreditCardMinimumPayment } from "@utilix-tech/sdk/units";
367
367
 
368
368
  // File sizes
369
369
  convertBytes(1073741824, "GB"); // 1
@@ -8,6 +8,7 @@ __export(time_exports, {
8
8
  TIMEZONES: () => TIMEZONES,
9
9
  convertTime: () => convertTime,
10
10
  diffDates: () => diffDates,
11
+ findCronOverlaps: () => findCronOverlaps,
11
12
  formatInTimezone: () => formatInTimezone,
12
13
  formatIso8601Duration: () => formatIso8601Duration,
13
14
  formatRelative: () => formatRelative,
@@ -683,6 +684,42 @@ function getRunInterval(dates) {
683
684
  const days = Math.round(diffMins / 1440);
684
685
  return `Every ${days} days`;
685
686
  }
687
+ var MAX_CRON_OVERLAPS = 200;
688
+ function findCronOverlaps(expressions, windowDays = 30, fromDate) {
689
+ if (expressions.length < 2) return { error: "Provide at least two cron expressions to check for overlaps" };
690
+ if (expressions.length > 10) return { error: "Provide 10 or fewer cron expressions" };
691
+ if (windowDays < 1 || windowDays > 365) return { error: "windowDays must be between 1 and 365" };
692
+ const parsedList = [];
693
+ for (let i = 0; i < expressions.length; i++) {
694
+ const parsed = parseCronExpression(expressions[i]);
695
+ if (typeof parsed === "object" && "error" in parsed) {
696
+ return { error: `Expression ${i + 1} ("${expressions[i]}"): ${parsed.error}` };
697
+ }
698
+ parsedList.push(parsed);
699
+ }
700
+ const start = fromDate ? new Date(fromDate) : /* @__PURE__ */ new Date();
701
+ const cursor = new Date(start);
702
+ cursor.setSeconds(0, 0);
703
+ cursor.setMinutes(cursor.getMinutes() + 1);
704
+ const endTime = cursor.getTime() + windowDays * 24 * 60 * 60 * 1e3;
705
+ const overlaps = [];
706
+ let truncated = false;
707
+ while (cursor.getTime() < endTime) {
708
+ const matched = [];
709
+ for (let i = 0; i < parsedList.length; i++) {
710
+ if (matchesCron(cursor, parsedList[i])) matched.push(i);
711
+ }
712
+ if (matched.length >= 2) {
713
+ if (overlaps.length >= MAX_CRON_OVERLAPS) {
714
+ truncated = true;
715
+ break;
716
+ }
717
+ overlaps.push({ date: new Date(cursor), expressionIndexes: matched });
718
+ }
719
+ cursor.setMinutes(cursor.getMinutes() + 1);
720
+ }
721
+ return { overlaps, windowDays, truncated };
722
+ }
686
723
  var DURATION_SECONDS_PER_YEAR = 365 * 86400;
687
724
  var DURATION_SECONDS_PER_MONTH = 30 * 86400;
688
725
  function humanizeDurationParts(parts) {
@@ -775,4 +812,4 @@ function formatIso8601Duration(seconds) {
775
812
  };
776
813
  }
777
814
 
778
- export { COMMON_CRONS, COMMON_DATE_PRESETS, TIMEZONES, convertTime, diffDates, formatInTimezone, formatIso8601Duration, formatRelative, formatRunDate, fromIsoString, fromUnix, getAllZonesForTime, getNextRuns, getNow, getRunInterval, getTimezoneOffset, humanizeDiff, parseCron, parseCronExpression, parseDate, parseIso8601Duration, time_exports };
815
+ export { COMMON_CRONS, COMMON_DATE_PRESETS, TIMEZONES, convertTime, diffDates, findCronOverlaps, formatInTimezone, formatIso8601Duration, formatRelative, formatRunDate, fromIsoString, fromUnix, getAllZonesForTime, getNextRuns, getNow, getRunInterval, getTimezoneOffset, humanizeDiff, parseCron, parseCronExpression, parseDate, parseIso8601Duration, time_exports };
@@ -28,6 +28,7 @@ __export(units_exports, {
28
28
  calculateCdMaturity: () => calculateCdMaturity,
29
29
  calculateChange: () => calculateChange,
30
30
  calculateCompoundInterest: () => calculateCompoundInterest,
31
+ calculateCreditCardMinimumPayment: () => calculateCreditCardMinimumPayment,
31
32
  calculateCreditUtilization: () => calculateCreditUtilization,
32
33
  calculateDebtToIncomeRatio: () => calculateDebtToIncomeRatio,
33
34
  calculateDepreciationSchedule: () => calculateDepreciationSchedule,
@@ -2807,5 +2808,53 @@ function calculateRealRateOfReturn(input) {
2807
2808
  solvedFor
2808
2809
  };
2809
2810
  }
2811
+ var CREDIT_CARD_MIN_PAYMENT_MAX_MONTHS = 1200;
2812
+ function calculateCreditCardMinimumPayment(balance, aprPercent, minPaymentPercent, minPaymentFloor = 0) {
2813
+ if (!Number.isFinite(balance) || balance <= 0) {
2814
+ return { error: "balance must be a finite number greater than zero" };
2815
+ }
2816
+ if (!Number.isFinite(aprPercent) || aprPercent < 0) {
2817
+ return { error: "aprPercent must be a finite, non-negative number" };
2818
+ }
2819
+ if (!Number.isFinite(minPaymentPercent) || minPaymentPercent <= 0) {
2820
+ return { error: "minPaymentPercent must be a finite number greater than zero" };
2821
+ }
2822
+ if (!Number.isFinite(minPaymentFloor) || minPaymentFloor < 0) {
2823
+ return { error: "minPaymentFloor must be a finite, non-negative number" };
2824
+ }
2825
+ const round22 = (n) => Math.round(n * 100) / 100;
2826
+ const monthlyRate = aprPercent / 100 / 12;
2827
+ let bal = balance;
2828
+ let totalInterestPaid = 0;
2829
+ let totalPaid = 0;
2830
+ let firstMonthPayment = 0;
2831
+ let finalMonthPayment = 0;
2832
+ let month = 0;
2833
+ while (bal > 5e-3 && month < CREDIT_CARD_MIN_PAYMENT_MAX_MONTHS) {
2834
+ month++;
2835
+ const interest = bal * monthlyRate;
2836
+ bal += interest;
2837
+ totalInterestPaid += interest;
2838
+ let payment = Math.max(bal * (minPaymentPercent / 100), minPaymentFloor);
2839
+ if (payment > bal) payment = bal;
2840
+ bal -= payment;
2841
+ totalPaid += payment;
2842
+ finalMonthPayment = round22(payment);
2843
+ if (month === 1) firstMonthPayment = round22(payment);
2844
+ }
2845
+ if (bal > 5e-3) {
2846
+ return {
2847
+ error: `balance cannot be paid off within ${CREDIT_CARD_MIN_PAYMENT_MAX_MONTHS} months at this minimum-payment formula; increase minPaymentPercent or minPaymentFloor`
2848
+ };
2849
+ }
2850
+ return {
2851
+ monthsToPayoff: month,
2852
+ yearsToPayoff: round22(month / 12),
2853
+ totalInterestPaid: round22(totalInterestPaid),
2854
+ totalPaid: round22(totalPaid),
2855
+ firstMonthPayment,
2856
+ finalMonthPayment
2857
+ };
2858
+ }
2810
2859
 
2811
- 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, calculateLoanPrepaymentPenalty, calculateLoanRefinance, calculateMarginMarkup, calculateMortgagePoints, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRealRateOfReturn, calculateRequiredBandwidth, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTaxEquivalentYield, calculateTimeValue, calculateTipSplit, calculateTransferTime, 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, validateIsin, validateVin, viewportToPx };
2860
+ 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, calculateCreditCardMinimumPayment, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, calculateGpa, calculateLoan, calculateLoanPrepaymentPenalty, calculateLoanRefinance, calculateMarginMarkup, calculateMortgagePoints, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRealRateOfReturn, calculateRequiredBandwidth, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTaxEquivalentYield, calculateTimeValue, calculateTipSplit, calculateTransferTime, 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, validateIsin, validateVin, viewportToPx };
@@ -18,6 +18,7 @@ __export(text_exports, {
18
18
  applyOps: () => applyOps,
19
19
  calculateStringDistance: () => calculateStringDistance,
20
20
  centerText: () => centerText,
21
+ checkDashUsage: () => checkDashUsage,
21
22
  checkOxfordCommaConsistency: () => checkOxfordCommaConsistency,
22
23
  convertAll: () => convertAll,
23
24
  convertCase: () => convertCase,
@@ -3191,5 +3192,80 @@ function checkOxfordCommaConsistency(text) {
3191
3192
  const consistent = withOxfordComma === 0 || withoutOxfordComma === 0;
3192
3193
  return { totalLists: instances.length, withOxfordComma, withoutOxfordComma, consistent, instances };
3193
3194
  }
3195
+ function dashContextSnippet(text, index, matchLen) {
3196
+ const start = Math.max(0, index - 20);
3197
+ const end = Math.min(text.length, index + matchLen + 20);
3198
+ const body = text.slice(start, end).replace(/\s+/g, " ").trim();
3199
+ return (start > 0 ? "\u2026" : "") + body + (end < text.length ? "\u2026" : "");
3200
+ }
3201
+ function checkDashUsage(text) {
3202
+ const issues = [];
3203
+ const enDashCount = (text.match(/–/g) ?? []).length;
3204
+ const hyphenCount = (text.match(/-/g) ?? []).length;
3205
+ const doubleHyphenMatches = [...text.matchAll(/-{2,}/g)];
3206
+ for (const m of doubleHyphenMatches) {
3207
+ const index = m.index ?? 0;
3208
+ issues.push({
3209
+ type: "double-hyphen",
3210
+ index,
3211
+ context: dashContextSnippet(text, index, m[0].length),
3212
+ message: `Found ${m[0].length} consecutive hyphens ("${m[0]}"); likely meant to be an em dash (\u2014) or en dash (\u2013).`
3213
+ });
3214
+ }
3215
+ const spacedHyphenMatches = [...text.matchAll(/(?<=\S) - (?=\S)/g)];
3216
+ for (const m of spacedHyphenMatches) {
3217
+ const index = m.index ?? 0;
3218
+ issues.push({
3219
+ type: "spaced-hyphen",
3220
+ index,
3221
+ context: dashContextSnippet(text, index, m[0].length),
3222
+ message: "A hyphen surrounded by spaces usually signals an intended em dash (\u2014), not a hyphenated compound word."
3223
+ });
3224
+ }
3225
+ const emDashOccurrences = [...text.matchAll(/—/g)];
3226
+ let spacedEm = 0;
3227
+ let unspacedEm = 0;
3228
+ for (const m of emDashOccurrences) {
3229
+ const idx = m.index ?? 0;
3230
+ const before = text[idx - 1];
3231
+ const after = text[idx + 1];
3232
+ if (before === " " && after === " ") spacedEm++;
3233
+ else if (before !== " " && after !== " ") unspacedEm++;
3234
+ }
3235
+ let dominantEmDashStyle = "none";
3236
+ let emDashSpacingConsistent = true;
3237
+ if (emDashOccurrences.length > 0) {
3238
+ dominantEmDashStyle = spacedEm >= unspacedEm ? "spaced" : "unspaced";
3239
+ emDashSpacingConsistent = spacedEm === 0 || unspacedEm === 0;
3240
+ if (!emDashSpacingConsistent) {
3241
+ for (const m of emDashOccurrences) {
3242
+ const idx = m.index ?? 0;
3243
+ const before = text[idx - 1];
3244
+ const after = text[idx + 1];
3245
+ const isSpaced = before === " " && after === " ";
3246
+ const matchesDominant = dominantEmDashStyle === "spaced" ? isSpaced : !isSpaced;
3247
+ if (!matchesDominant) {
3248
+ issues.push({
3249
+ type: "inconsistent-em-dash-spacing",
3250
+ index: idx,
3251
+ context: dashContextSnippet(text, idx, 1),
3252
+ message: `This em dash is ${isSpaced ? "spaced" : "unspaced"}, but the document mostly uses ${dominantEmDashStyle} em dashes.`
3253
+ });
3254
+ }
3255
+ }
3256
+ }
3257
+ }
3258
+ issues.sort((a, b) => a.index - b.index);
3259
+ return {
3260
+ emDashCount: emDashOccurrences.length,
3261
+ enDashCount,
3262
+ hyphenCount,
3263
+ doubleHyphenCount: doubleHyphenMatches.length,
3264
+ spacedHyphenCount: spacedHyphenMatches.length,
3265
+ emDashSpacingConsistent,
3266
+ dominantEmDashStyle,
3267
+ issues
3268
+ };
3269
+ }
3194
3270
 
3195
- export { CASE_FORMATS, DEFAULT_CONVERT_OPTIONS, EMOJI_TABLE, ESCAPE_MODES, LINE_OPS, MORSE_CODE, addBorder, analyzeKeywordDensity, analyzeSentenceLengths, analyzeText, applyOp, applyOps, calculateStringDistance, centerText, checkOxfordCommaConsistency, convertAll, convertCase, countWords, csvToHtml, csvToMarkdown, detectDelimiter, detectFillerWords, detectPassiveVoice, detectWordyPhrases, diffLines, diffLinesSimple, diffStats, escapeAll, escapeString, extractHeadings, formatReadingTime, generate, generateDiff, generateHtmlTable, generateMarkdownTable, generateParagraphs, generateSentences, generateWords, getAvailableFonts, getEmojiByCategory, getEmojiByChar, getEmojiByShortcode, getEmojiCategories, getMorseForChar, getMorseTiming, htmlToMarkdown, isValidMorse, markdownToHtml, morseToText, numberToOrdinal, numberToRoman, numberToWords, ordinalWords, parseDiff, parseTableData, readabilityScore, renderMarkdown, romanToNumber, scoreReadability, searchEmoji, sentenceCount, slugify, slugifyAll, syllableCount, textToAscii, textToMorse, text_exports, unescapeString, wordFrequency };
3271
+ export { CASE_FORMATS, DEFAULT_CONVERT_OPTIONS, EMOJI_TABLE, ESCAPE_MODES, LINE_OPS, MORSE_CODE, addBorder, analyzeKeywordDensity, analyzeSentenceLengths, analyzeText, applyOp, applyOps, calculateStringDistance, centerText, checkDashUsage, checkOxfordCommaConsistency, convertAll, convertCase, countWords, csvToHtml, csvToMarkdown, detectDelimiter, detectFillerWords, detectPassiveVoice, detectWordyPhrases, diffLines, diffLinesSimple, diffStats, escapeAll, escapeString, extractHeadings, formatReadingTime, generate, generateDiff, generateHtmlTable, generateMarkdownTable, generateParagraphs, generateSentences, generateWords, getAvailableFonts, getEmojiByCategory, getEmojiByChar, getEmojiByShortcode, getEmojiCategories, getMorseForChar, getMorseTiming, htmlToMarkdown, isValidMorse, markdownToHtml, morseToText, numberToOrdinal, numberToRoman, numberToWords, ordinalWords, parseDiff, parseTableData, readabilityScore, renderMarkdown, romanToNumber, scoreReadability, searchEmoji, sentenceCount, slugify, slugifyAll, syllableCount, textToAscii, textToMorse, text_exports, unescapeString, wordFrequency };
@@ -39,6 +39,7 @@ __export(code_exports, {
39
39
  getMethodColor: () => getMethodColor,
40
40
  isValidTag: () => isValidTag,
41
41
  lintConventionalCommit: () => lintConventionalCommit,
42
+ lintDockerfile: () => lintDockerfile,
42
43
  lookupMime: () => lookupMime,
43
44
  minifyCss: () => minifyCss,
44
45
  minifyGql: () => minifyGql,
@@ -1869,6 +1870,111 @@ function normalizeRef(ref) {
1869
1870
  const tagPart = parsed.digest ? `@${parsed.digest}` : parsed.tag ? `:${parsed.tag}` : "";
1870
1871
  return `${parsed.registry}/${ns}${parsed.repository}${tagPart}`;
1871
1872
  }
1873
+ function _parseDockerfileInstructions(content) {
1874
+ const rawLines = content.replace(/\r\n/g, "\n").split("\n");
1875
+ const instructions = [];
1876
+ let buffer = "";
1877
+ let bufferStartLine = 0;
1878
+ for (let i = 0; i < rawLines.length; i++) {
1879
+ const lineNo = i + 1;
1880
+ const line = rawLines[i];
1881
+ const trimmed = line.trim();
1882
+ if (buffer === "") {
1883
+ if (trimmed === "" || trimmed.startsWith("#")) continue;
1884
+ bufferStartLine = lineNo;
1885
+ buffer = line.trimEnd();
1886
+ } else {
1887
+ buffer += "\n" + line.trimEnd();
1888
+ }
1889
+ if (buffer.endsWith("\\")) {
1890
+ buffer = buffer.slice(0, -1);
1891
+ continue;
1892
+ }
1893
+ const match = buffer.trim().match(/^([A-Za-z]+)\s*([\s\S]*)$/);
1894
+ if (match) {
1895
+ instructions.push({ instruction: match[1].toUpperCase(), args: match[2].trim(), line: bufferStartLine });
1896
+ }
1897
+ buffer = "";
1898
+ }
1899
+ return instructions;
1900
+ }
1901
+ var _DOCKERFILE_TAR_RE = /\.(tar(\.(gz|bz2|xz))?|tgz|tbz2|txz)$/i;
1902
+ function lintDockerfile(content) {
1903
+ if (!content || !content.trim()) return { error: "Dockerfile content is required" };
1904
+ const instructions = _parseDockerfileInstructions(content);
1905
+ if (instructions.length === 0) return { error: "No Dockerfile instructions found" };
1906
+ const fromInstructions = instructions.filter((i) => i.instruction === "FROM");
1907
+ if (fromInstructions.length === 0) return { error: "No FROM instruction found; this does not look like a valid Dockerfile" };
1908
+ const stageNames = /* @__PURE__ */ new Set();
1909
+ const stages = fromInstructions.map((inst, idx) => {
1910
+ const asMatch = inst.args.match(/^(\S+)(?:\s+AS\s+(\S+))?/i);
1911
+ const baseImage = asMatch ? asMatch[1] : inst.args.split(/\s+/)[0];
1912
+ const name = asMatch && asMatch[2] ? asMatch[2] : null;
1913
+ if (name) stageNames.add(name.toLowerCase());
1914
+ return { index: idx, name, baseImage, fromLine: inst.line };
1915
+ });
1916
+ const findings = [];
1917
+ for (const stage of stages) {
1918
+ const base = stage.baseImage;
1919
+ if (base.toLowerCase() === "scratch") continue;
1920
+ if (stageNames.has(base.toLowerCase())) continue;
1921
+ const withoutDigest = base.split("@")[0];
1922
+ const hasTag = withoutDigest.includes(":");
1923
+ const tag = hasTag ? withoutDigest.split(":").pop() : null;
1924
+ if (!hasTag) {
1925
+ findings.push({
1926
+ rule: "unpinned-base-image",
1927
+ severity: "warning",
1928
+ line: stage.fromLine,
1929
+ message: `FROM ${base} has no tag, so it resolves to ":latest", which can silently change what gets built on a future run. Pin an explicit version tag instead.`
1930
+ });
1931
+ } else if (tag === "latest") {
1932
+ findings.push({
1933
+ rule: "unpinned-base-image",
1934
+ severity: "warning",
1935
+ line: stage.fromLine,
1936
+ message: `FROM ${base} is explicitly pinned to the "latest" tag, which is a moving target rather than a fixed version. Pin an explicit version tag instead.`
1937
+ });
1938
+ }
1939
+ }
1940
+ const finalStage = stages[stages.length - 1];
1941
+ const finalStageInstructions = instructions.filter((i) => i.line >= finalStage.fromLine);
1942
+ if (!finalStageInstructions.some((i) => i.instruction === "WORKDIR")) {
1943
+ findings.push({
1944
+ rule: "missing-workdir",
1945
+ severity: "warning",
1946
+ line: finalStage.fromLine,
1947
+ message: 'No WORKDIR instruction in the final stage, so RUN/CMD/ENTRYPOINT execute from "/" by default. Set an explicit WORKDIR.'
1948
+ });
1949
+ }
1950
+ if (!finalStageInstructions.some((i) => i.instruction === "USER")) {
1951
+ findings.push({
1952
+ rule: "running-as-root",
1953
+ severity: "warning",
1954
+ line: finalStage.fromLine,
1955
+ message: "No USER instruction in the final stage, so the container runs as root by default. Add a non-root USER unless root is genuinely required."
1956
+ });
1957
+ }
1958
+ for (const inst of instructions) {
1959
+ if (inst.instruction !== "ADD") continue;
1960
+ const parts = inst.args.split(/\s+/).filter(Boolean).filter((p) => !p.startsWith("--"));
1961
+ if (parts.length < 2) continue;
1962
+ const sources = parts.slice(0, -1);
1963
+ for (const src of sources) {
1964
+ const isUrl = /^https?:\/\//i.test(src);
1965
+ const isTar = _DOCKERFILE_TAR_RE.test(src);
1966
+ if (!isUrl && !isTar) {
1967
+ findings.push({
1968
+ rule: "add-vs-copy",
1969
+ severity: "info",
1970
+ line: inst.line,
1971
+ message: `ADD ${src} copies a local file/directory, not a URL or an auto-extracting archive. Use COPY instead, since ADD's extra behavior (remote fetch, tar auto-extract) doesn't apply here.`
1972
+ });
1973
+ }
1974
+ }
1975
+ }
1976
+ return { findings, stages };
1977
+ }
1872
1978
  function removeJsComments(code) {
1873
1979
  let result = "";
1874
1980
  let i = 0;
@@ -4328,4 +4434,4 @@ function extractMarkdownLinkReferences(markdown) {
4328
4434
  };
4329
4435
  }
4330
4436
 
4331
- export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, KNOWN_LANGUAGE_TAGS, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, analyzeRegexGroups, auditDependencyRanges, buildDockerPull, buildDockerRun, buildGitCommand, code_exports, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, countSqlPlaceholders, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, extractMarkdownFootnotes, extractMarkdownLinkReferences, extractSvgSpriteSymbols, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseCommitTrailers, parseConnectionString, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateAria, validateEditorConfig, validateEnvKey, validateFenceLanguageTags, validatePackageExports, validateTsconfig };
4437
+ export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, KNOWN_LANGUAGE_TAGS, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, analyzeRegexGroups, auditDependencyRanges, buildDockerPull, buildDockerRun, buildGitCommand, code_exports, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, countSqlPlaceholders, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, extractMarkdownFootnotes, extractMarkdownLinkReferences, extractSvgSpriteSymbols, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lintDockerfile, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseCommitTrailers, parseConnectionString, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateAria, validateEditorConfig, validateEnvKey, validateFenceLanguageTags, validatePackageExports, validateTsconfig };
@@ -12,6 +12,7 @@
12
12
  * - git-builder (buildGitCommand, parseGitCommand, OPERATIONS)
13
13
  * - docker-image-parser (parseDockerImage, buildDockerPull, buildDockerRun,
14
14
  * isValidTag, normalizeRef)
15
+ * - dockerfile-linter (lintDockerfile)
15
16
  * - js-minifier (minifyJs, removeJsComments, collapseJsWhitespace,
16
17
  * removeConsoleCalls, getJsStats)
17
18
  * - openapi-viewer (parseSpec, getEndpointsByTag, searchEndpoints, getMethodColor)
@@ -175,6 +176,32 @@ declare function buildDockerPull(parsed: DockerImageRef): string;
175
176
  declare function buildDockerRun(parsed: DockerImageRef, containerName?: string): string;
176
177
  declare function isValidTag(tag: string): boolean;
177
178
  declare function normalizeRef(ref: string): string;
179
+ interface DockerfileLintFinding {
180
+ rule: 'unpinned-base-image' | 'missing-workdir' | 'running-as-root' | 'add-vs-copy';
181
+ severity: 'warning' | 'info';
182
+ line: number;
183
+ message: string;
184
+ }
185
+ interface DockerfileStage {
186
+ index: number;
187
+ name: string | null;
188
+ baseImage: string;
189
+ fromLine: number;
190
+ }
191
+ interface DockerfileLintResult {
192
+ findings: DockerfileLintFinding[];
193
+ stages: DockerfileStage[];
194
+ }
195
+ /**
196
+ * Lint a Dockerfile for 4 common mistakes: a base image with no tag or
197
+ * pinned to `:latest`, a final stage with no WORKDIR, a final stage with no
198
+ * USER (so it runs as root), and ADD used on a plain local file/directory
199
+ * where COPY would do (ADD's extra behavior only makes sense for a remote
200
+ * URL or an auto-extracting archive).
201
+ */
202
+ declare function lintDockerfile(content: string): DockerfileLintResult | {
203
+ error: string;
204
+ };
178
205
  interface JsMinifyOptions {
179
206
  removeComments?: boolean;
180
207
  collapseWhitespace?: boolean;
@@ -780,6 +807,9 @@ type code_DependencyAuditResult = DependencyAuditResult;
780
807
  type code_DependencyRangeType = DependencyRangeType;
781
808
  type code_DependencySection = DependencySection;
782
809
  type code_DockerImageRef = DockerImageRef;
810
+ type code_DockerfileLintFinding = DockerfileLintFinding;
811
+ type code_DockerfileLintResult = DockerfileLintResult;
812
+ type code_DockerfileStage = DockerfileStage;
783
813
  type code_EditorConfigIssue = EditorConfigIssue;
784
814
  type code_EditorConfigProperty = EditorConfigProperty;
785
815
  type code_EditorConfigSection = EditorConfigSection;
@@ -871,6 +901,7 @@ declare const code_getJsStats: typeof getJsStats;
871
901
  declare const code_getMethodColor: typeof getMethodColor;
872
902
  declare const code_isValidTag: typeof isValidTag;
873
903
  declare const code_lintConventionalCommit: typeof lintConventionalCommit;
904
+ declare const code_lintDockerfile: typeof lintDockerfile;
874
905
  declare const code_lookupMime: typeof lookupMime;
875
906
  declare const code_minifyCss: typeof minifyCss;
876
907
  declare const code_minifyGql: typeof minifyGql;
@@ -903,7 +934,7 @@ declare const code_validateFenceLanguageTags: typeof validateFenceLanguageTags;
903
934
  declare const code_validatePackageExports: typeof validatePackageExports;
904
935
  declare const code_validateTsconfig: typeof validateTsconfig;
905
936
  declare namespace code {
906
- export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, type code_AriaIssue as AriaIssue, type code_AriaValidationResult as AriaValidationResult, code_CHEATSHEET as CHEATSHEET, type code_CheatsheetEntry as CheatsheetEntry, type code_CommitTrailer as CommitTrailer, type code_CommitTrailerResult as CommitTrailerResult, type code_ConnectionStringHost as ConnectionStringHost, type code_ConnectionStringResult as ConnectionStringResult, type code_ConventionalCommitFinding as ConventionalCommitFinding, type code_ConventionalCommitFooter as ConventionalCommitFooter, type code_ConventionalCommitOptions as ConventionalCommitOptions, type code_ConventionalCommitParsed as ConventionalCommitParsed, type code_ConventionalCommitResult as ConventionalCommitResult, type code_ConventionalCommitSeverity as ConventionalCommitSeverity, type code_CssResult as CssResult, code_DEFAULT_COMMIT_TYPES as DEFAULT_COMMIT_TYPES, type code_DependencyAuditDuplicate as DependencyAuditDuplicate, type code_DependencyAuditEntry as DependencyAuditEntry, type code_DependencyAuditIssue as DependencyAuditIssue, type code_DependencyAuditResult as DependencyAuditResult, type code_DependencyRangeType as DependencyRangeType, type code_DependencySection as DependencySection, type code_DockerImageRef as DockerImageRef, type code_EditorConfigIssue as EditorConfigIssue, type code_EditorConfigProperty as EditorConfigProperty, type code_EditorConfigSection as EditorConfigSection, type code_EditorConfigValidationResult as EditorConfigValidationResult, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, type code_ExportsIssue as ExportsIssue, type code_ExportsShape as ExportsShape, type code_ExportsValidationResult as ExportsValidationResult, type code_FenceTagIssue as FenceTagIssue, type code_FenceTagIssueType as FenceTagIssueType, type code_FenceValidationResult as FenceValidationResult, type code_GitCommandConfig as GitCommandConfig, type code_GitCommandResult as GitCommandResult, type code_GitOperation as GitOperation, type code_GithubUrlInfo as GithubUrlInfo, type code_GithubUrlType as GithubUrlType, type code_GitignoreTestResult as GitignoreTestResult, type code_GqlFormatResult as GqlFormatResult, type code_HtmlFormatResult as HtmlFormatResult, type code_HtmlMinifyOptions as HtmlMinifyOptions, type code_HtmlMinifyResult as HtmlMinifyResult, type code_JsMinifyOptions as JsMinifyOptions, type code_JsMinifyResult as JsMinifyResult, code_KNOWN_LANGUAGE_TAGS as KNOWN_LANGUAGE_TAGS, type code_LinkReferenceDefinition as LinkReferenceDefinition, type code_LinkReferenceUsage as LinkReferenceUsage, code_MIME_TABLE as MIME_TABLE, type code_MarkdownFootnoteDefinition as MarkdownFootnoteDefinition, type code_MarkdownFootnoteReference as MarkdownFootnoteReference, type code_MarkdownFootnoteResult as MarkdownFootnoteResult, type code_MarkdownLinkReferenceResult as MarkdownLinkReferenceResult, type code_MatchResult as MatchResult, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_PlaceholderStyle as PlaceholderStyle, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexBackreferenceInfo as RegexBackreferenceInfo, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexGroupAnalysis as RegexGroupAnalysis, type code_RegexGroupInfo as RegexGroupInfo, type code_RegexGroupIssue as RegexGroupIssue, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, type code_ResolvedLinkReference as ResolvedLinkReference, code_SQL_DEFAULT_OPTIONS as SQL_DEFAULT_OPTIONS, type code_Segment as Segment, type code_SpecVersion as SpecVersion, type code_SqlDialect as SqlDialect, type code_SqlFormatOptions as SqlFormatOptions, type code_SqlPlaceholder as SqlPlaceholder, type code_SqlPlaceholderResult as SqlPlaceholderResult, type code_SvgSpriteResult as SvgSpriteResult, type code_SvgSpriteSymbol as SvgSpriteSymbol, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_analyzeRegexGroups as analyzeRegexGroups, code_auditDependencyRanges as auditDependencyRanges, code_buildDockerPull as buildDockerPull, code_buildDockerRun as buildDockerRun, code_buildGitCommand as buildGitCommand, code_collapseHtmlWhitespace as collapseHtmlWhitespace, code_collapseJsWhitespace as collapseJsWhitespace, code_countProperties as countProperties, code_countRules as countRules, code_countSqlPlaceholders as countSqlPlaceholders, code_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_extractMarkdownFootnotes as extractMarkdownFootnotes, code_extractMarkdownLinkReferences as extractMarkdownLinkReferences, code_extractSvgSpriteSymbols as extractSvgSpriteSymbols, code_formatCss as formatCss, code_formatGql as formatGql, code_formatHtml as formatHtml, code_formatSql as formatSql, code_getEndpointsByTag as getEndpointsByTag, code_getHtmlStats as getHtmlStats, code_getJsStats as getJsStats, code_getMethodColor as getMethodColor, code_isValidTag as isValidTag, code_lintConventionalCommit as lintConventionalCommit, code_lookupMime as lookupMime, code_minifyCss as minifyCss, code_minifyGql as minifyGql, code_minifyHtml as minifyHtml, code_minifyJs as minifyJs, code_minifySql as minifySql, code_normalizeRef as normalizeRef, code_parseCommitTrailers as parseCommitTrailers, code_parseConnectionString as parseConnectionString, code_parseDockerImage as parseDockerImage, code_parseEnv as parseEnv, code_parseGitCommand as parseGitCommand, code_parseGithubUrl as parseGithubUrl, code_parseSpec as parseSpec, code_removeConsoleCalls as removeConsoleCalls, code_removeEmptyAttributes as removeEmptyAttributes, code_removeHtmlComments as removeHtmlComments, code_removeJsComments as removeJsComments, code_removeRedundantAttributes as removeRedundantAttributes, code_searchCheatsheet as searchCheatsheet, code_searchEndpoints as searchEndpoints, code_splitStatements as splitStatements, code_testGitignorePatterns as testGitignorePatterns, code_testPattern as testPattern, code_testRegex as testRegex, code_validateAria as validateAria, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validateFenceLanguageTags as validateFenceLanguageTags, code_validatePackageExports as validatePackageExports, code_validateTsconfig as validateTsconfig };
937
+ export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, type code_AriaIssue as AriaIssue, type code_AriaValidationResult as AriaValidationResult, code_CHEATSHEET as CHEATSHEET, type code_CheatsheetEntry as CheatsheetEntry, type code_CommitTrailer as CommitTrailer, type code_CommitTrailerResult as CommitTrailerResult, type code_ConnectionStringHost as ConnectionStringHost, type code_ConnectionStringResult as ConnectionStringResult, type code_ConventionalCommitFinding as ConventionalCommitFinding, type code_ConventionalCommitFooter as ConventionalCommitFooter, type code_ConventionalCommitOptions as ConventionalCommitOptions, type code_ConventionalCommitParsed as ConventionalCommitParsed, type code_ConventionalCommitResult as ConventionalCommitResult, type code_ConventionalCommitSeverity as ConventionalCommitSeverity, type code_CssResult as CssResult, code_DEFAULT_COMMIT_TYPES as DEFAULT_COMMIT_TYPES, type code_DependencyAuditDuplicate as DependencyAuditDuplicate, type code_DependencyAuditEntry as DependencyAuditEntry, type code_DependencyAuditIssue as DependencyAuditIssue, type code_DependencyAuditResult as DependencyAuditResult, type code_DependencyRangeType as DependencyRangeType, type code_DependencySection as DependencySection, type code_DockerImageRef as DockerImageRef, type code_DockerfileLintFinding as DockerfileLintFinding, type code_DockerfileLintResult as DockerfileLintResult, type code_DockerfileStage as DockerfileStage, type code_EditorConfigIssue as EditorConfigIssue, type code_EditorConfigProperty as EditorConfigProperty, type code_EditorConfigSection as EditorConfigSection, type code_EditorConfigValidationResult as EditorConfigValidationResult, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, type code_ExportsIssue as ExportsIssue, type code_ExportsShape as ExportsShape, type code_ExportsValidationResult as ExportsValidationResult, type code_FenceTagIssue as FenceTagIssue, type code_FenceTagIssueType as FenceTagIssueType, type code_FenceValidationResult as FenceValidationResult, type code_GitCommandConfig as GitCommandConfig, type code_GitCommandResult as GitCommandResult, type code_GitOperation as GitOperation, type code_GithubUrlInfo as GithubUrlInfo, type code_GithubUrlType as GithubUrlType, type code_GitignoreTestResult as GitignoreTestResult, type code_GqlFormatResult as GqlFormatResult, type code_HtmlFormatResult as HtmlFormatResult, type code_HtmlMinifyOptions as HtmlMinifyOptions, type code_HtmlMinifyResult as HtmlMinifyResult, type code_JsMinifyOptions as JsMinifyOptions, type code_JsMinifyResult as JsMinifyResult, code_KNOWN_LANGUAGE_TAGS as KNOWN_LANGUAGE_TAGS, type code_LinkReferenceDefinition as LinkReferenceDefinition, type code_LinkReferenceUsage as LinkReferenceUsage, code_MIME_TABLE as MIME_TABLE, type code_MarkdownFootnoteDefinition as MarkdownFootnoteDefinition, type code_MarkdownFootnoteReference as MarkdownFootnoteReference, type code_MarkdownFootnoteResult as MarkdownFootnoteResult, type code_MarkdownLinkReferenceResult as MarkdownLinkReferenceResult, type code_MatchResult as MatchResult, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_PlaceholderStyle as PlaceholderStyle, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexBackreferenceInfo as RegexBackreferenceInfo, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexGroupAnalysis as RegexGroupAnalysis, type code_RegexGroupInfo as RegexGroupInfo, type code_RegexGroupIssue as RegexGroupIssue, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, type code_ResolvedLinkReference as ResolvedLinkReference, code_SQL_DEFAULT_OPTIONS as SQL_DEFAULT_OPTIONS, type code_Segment as Segment, type code_SpecVersion as SpecVersion, type code_SqlDialect as SqlDialect, type code_SqlFormatOptions as SqlFormatOptions, type code_SqlPlaceholder as SqlPlaceholder, type code_SqlPlaceholderResult as SqlPlaceholderResult, type code_SvgSpriteResult as SvgSpriteResult, type code_SvgSpriteSymbol as SvgSpriteSymbol, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_analyzeRegexGroups as analyzeRegexGroups, code_auditDependencyRanges as auditDependencyRanges, code_buildDockerPull as buildDockerPull, code_buildDockerRun as buildDockerRun, code_buildGitCommand as buildGitCommand, code_collapseHtmlWhitespace as collapseHtmlWhitespace, code_collapseJsWhitespace as collapseJsWhitespace, code_countProperties as countProperties, code_countRules as countRules, code_countSqlPlaceholders as countSqlPlaceholders, code_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_extractMarkdownFootnotes as extractMarkdownFootnotes, code_extractMarkdownLinkReferences as extractMarkdownLinkReferences, code_extractSvgSpriteSymbols as extractSvgSpriteSymbols, code_formatCss as formatCss, code_formatGql as formatGql, code_formatHtml as formatHtml, code_formatSql as formatSql, code_getEndpointsByTag as getEndpointsByTag, code_getHtmlStats as getHtmlStats, code_getJsStats as getJsStats, code_getMethodColor as getMethodColor, code_isValidTag as isValidTag, code_lintConventionalCommit as lintConventionalCommit, code_lintDockerfile as lintDockerfile, code_lookupMime as lookupMime, code_minifyCss as minifyCss, code_minifyGql as minifyGql, code_minifyHtml as minifyHtml, code_minifyJs as minifyJs, code_minifySql as minifySql, code_normalizeRef as normalizeRef, code_parseCommitTrailers as parseCommitTrailers, code_parseConnectionString as parseConnectionString, code_parseDockerImage as parseDockerImage, code_parseEnv as parseEnv, code_parseGitCommand as parseGitCommand, code_parseGithubUrl as parseGithubUrl, code_parseSpec as parseSpec, code_removeConsoleCalls as removeConsoleCalls, code_removeEmptyAttributes as removeEmptyAttributes, code_removeHtmlComments as removeHtmlComments, code_removeJsComments as removeJsComments, code_removeRedundantAttributes as removeRedundantAttributes, code_searchCheatsheet as searchCheatsheet, code_searchEndpoints as searchEndpoints, code_splitStatements as splitStatements, code_testGitignorePatterns as testGitignorePatterns, code_testPattern as testPattern, code_testRegex as testRegex, code_validateAria as validateAria, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validateFenceLanguageTags as validateFenceLanguageTags, code_validatePackageExports as validatePackageExports, code_validateTsconfig as validateTsconfig };
907
938
  }
908
939
 
909
- export { type LinkReferenceUsage as $, ALL_FLAGS as A, type EditorConfigValidationResult as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EditorConfigIssue as E, type EnvEntry as F, type EnvParseResult as G, type ExportsIssue as H, type ExportsShape as I, type ExportsValidationResult as J, type FenceTagIssue as K, type FenceTagIssueType as L, type FenceValidationResult as M, type GitCommandConfig as N, type GitCommandResult as O, type GitOperation as P, type GithubUrlInfo as Q, type GithubUrlType as R, type GitignoreTestResult as S, type GqlFormatResult as T, type HtmlFormatResult as U, type HtmlMinifyOptions as V, type HtmlMinifyResult as W, type JsMinifyOptions as X, type JsMinifyResult as Y, KNOWN_LANGUAGE_TAGS as Z, type LinkReferenceDefinition as _, type ApiEndpoint as a, lintConventionalCommit as a$, MIME_TABLE as a0, type MarkdownFootnoteDefinition as a1, type MarkdownFootnoteReference as a2, type MarkdownFootnoteResult as a3, type MarkdownLinkReferenceResult as a4, type MatchResult as a5, type MimeEntry as a6, type MimeLookupResult as a7, OPERATIONS as a8, type ParsedSpec as a9, analyzeRegexGroups as aA, auditDependencyRanges as aB, buildDockerPull as aC, buildDockerRun as aD, buildGitCommand as aE, collapseHtmlWhitespace as aF, collapseJsWhitespace as aG, countProperties as aH, countRules as aI, countSqlPlaceholders as aJ, detectDialect as aK, detectOperationType as aL, detectRedos as aM, envToExport as aN, envToJson as aO, extractMarkdownFootnotes as aP, extractMarkdownLinkReferences as aQ, extractSvgSpriteSymbols as aR, formatCss as aS, formatGql as aT, formatHtml as aU, formatSql as aV, getEndpointsByTag as aW, getHtmlStats as aX, getJsStats as aY, getMethodColor as aZ, isValidTag as a_, type PlaceholderStyle as aa, type RedosFinding as ab, type RedosResult as ac, type RedosSeverity as ad, type RegexBackreferenceInfo as ae, type RegexError as af, type RegexFlag as ag, type RegexGroupAnalysis as ah, type RegexGroupInfo as ai, type RegexGroupIssue as aj, type RegexMatch as ak, type RegexResult as al, type RegexSuccess as am, type ResolvedLinkReference as an, SQL_DEFAULT_OPTIONS as ao, type Segment as ap, type SpecVersion as aq, type SqlDialect as ar, type SqlFormatOptions as as, type SqlPlaceholder as at, type SqlPlaceholderResult as au, type SvgSpriteResult as av, type SvgSpriteSymbol as aw, type TestPatternResult as ax, type TsconfigIssue as ay, type TsconfigValidationResult as az, type ApiInfo as b, lookupMime as b0, minifyCss as b1, minifyGql as b2, minifyHtml as b3, minifyJs as b4, minifySql as b5, normalizeRef as b6, parseCommitTrailers as b7, parseConnectionString as b8, parseDockerImage as b9, parseEnv as ba, parseGitCommand as bb, parseGithubUrl as bc, parseSpec as bd, removeConsoleCalls as be, removeEmptyAttributes as bf, removeHtmlComments as bg, removeJsComments as bh, removeRedundantAttributes as bi, searchCheatsheet as bj, searchEndpoints as bk, splitStatements as bl, testGitignorePatterns as bm, testPattern as bn, testRegex as bo, validateAria as bp, validateEditorConfig as bq, validateEnvKey as br, validateFenceLanguageTags as bs, validatePackageExports as bt, validateTsconfig as bu, code as c, type AriaIssue as d, type AriaValidationResult as e, type CheatsheetEntry as f, type CommitTrailer as g, type CommitTrailerResult as h, type ConnectionStringHost as i, type ConnectionStringResult as j, type ConventionalCommitFinding as k, type ConventionalCommitFooter as l, type ConventionalCommitOptions as m, type ConventionalCommitParsed as n, type ConventionalCommitResult as o, type ConventionalCommitSeverity as p, type CssResult as q, type DependencyAuditDuplicate as r, type DependencyAuditEntry as s, type DependencyAuditIssue as t, type DependencyAuditResult as u, type DependencyRangeType as v, type DependencySection as w, type DockerImageRef as x, type EditorConfigProperty as y, type EditorConfigSection as z };
940
+ export { type JsMinifyResult as $, ALL_FLAGS as A, type DockerfileStage as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EditorConfigIssue as E, type EditorConfigProperty as F, type EditorConfigSection as G, type EditorConfigValidationResult as H, type EnvEntry as I, type EnvParseResult as J, type ExportsIssue as K, type ExportsShape as L, type ExportsValidationResult as M, type FenceTagIssue as N, type FenceTagIssueType as O, type FenceValidationResult as P, type GitCommandConfig 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 HtmlFormatResult as X, type HtmlMinifyOptions as Y, type HtmlMinifyResult as Z, type JsMinifyOptions as _, type ApiEndpoint as a, getJsStats as a$, KNOWN_LANGUAGE_TAGS as a0, type LinkReferenceDefinition as a1, type LinkReferenceUsage as a2, MIME_TABLE as a3, type MarkdownFootnoteDefinition as a4, type MarkdownFootnoteReference as a5, type MarkdownFootnoteResult as a6, type MarkdownLinkReferenceResult as a7, type MatchResult as a8, type MimeEntry as a9, type TestPatternResult as aA, type TsconfigIssue as aB, type TsconfigValidationResult as aC, analyzeRegexGroups as aD, auditDependencyRanges as aE, buildDockerPull as aF, buildDockerRun as aG, buildGitCommand as aH, collapseHtmlWhitespace as aI, collapseJsWhitespace as aJ, countProperties as aK, countRules as aL, countSqlPlaceholders as aM, detectDialect as aN, detectOperationType as aO, detectRedos as aP, envToExport as aQ, envToJson as aR, extractMarkdownFootnotes as aS, extractMarkdownLinkReferences as aT, extractSvgSpriteSymbols as aU, formatCss as aV, formatGql as aW, formatHtml as aX, formatSql as aY, getEndpointsByTag as aZ, getHtmlStats as a_, type MimeLookupResult as aa, OPERATIONS as ab, type ParsedSpec as ac, type PlaceholderStyle as ad, type RedosFinding as ae, type RedosResult as af, type RedosSeverity as ag, type RegexBackreferenceInfo as ah, type RegexError as ai, type RegexFlag as aj, type RegexGroupAnalysis as ak, type RegexGroupInfo as al, type RegexGroupIssue as am, type RegexMatch as an, type RegexResult as ao, type RegexSuccess as ap, type ResolvedLinkReference as aq, SQL_DEFAULT_OPTIONS as ar, type Segment as as, type SpecVersion as at, type SqlDialect as au, type SqlFormatOptions as av, type SqlPlaceholder as aw, type SqlPlaceholderResult as ax, type SvgSpriteResult as ay, type SvgSpriteSymbol as az, type ApiInfo as b, getMethodColor as b0, isValidTag as b1, lintConventionalCommit as b2, lintDockerfile as b3, lookupMime as b4, minifyCss as b5, minifyGql as b6, minifyHtml as b7, minifyJs as b8, minifySql as b9, normalizeRef as ba, parseCommitTrailers as bb, parseConnectionString as bc, parseDockerImage as bd, parseEnv as be, parseGitCommand as bf, parseGithubUrl as bg, parseSpec as bh, removeConsoleCalls as bi, removeEmptyAttributes as bj, removeHtmlComments as bk, removeJsComments as bl, removeRedundantAttributes as bm, searchCheatsheet as bn, searchEndpoints as bo, splitStatements as bp, testGitignorePatterns as bq, testPattern as br, testRegex as bs, validateAria as bt, validateEditorConfig as bu, validateEnvKey as bv, validateFenceLanguageTags as bw, validatePackageExports as bx, validateTsconfig as by, code as c, type AriaIssue as d, type AriaValidationResult as e, type CheatsheetEntry as f, type CommitTrailer as g, type CommitTrailerResult as h, type ConnectionStringHost as i, type ConnectionStringResult as j, type ConventionalCommitFinding as k, type ConventionalCommitFooter as l, type ConventionalCommitOptions as m, type ConventionalCommitParsed as n, type ConventionalCommitResult as o, type ConventionalCommitSeverity as p, type CssResult as q, type DependencyAuditDuplicate as r, type DependencyAuditEntry as s, type DependencyAuditIssue as t, type DependencyAuditResult as u, type DependencyRangeType as v, type DependencySection as w, type DockerImageRef as x, type DockerfileLintFinding as y, type DockerfileLintResult as z };
@@ -12,6 +12,7 @@
12
12
  * - git-builder (buildGitCommand, parseGitCommand, OPERATIONS)
13
13
  * - docker-image-parser (parseDockerImage, buildDockerPull, buildDockerRun,
14
14
  * isValidTag, normalizeRef)
15
+ * - dockerfile-linter (lintDockerfile)
15
16
  * - js-minifier (minifyJs, removeJsComments, collapseJsWhitespace,
16
17
  * removeConsoleCalls, getJsStats)
17
18
  * - openapi-viewer (parseSpec, getEndpointsByTag, searchEndpoints, getMethodColor)
@@ -175,6 +176,32 @@ declare function buildDockerPull(parsed: DockerImageRef): string;
175
176
  declare function buildDockerRun(parsed: DockerImageRef, containerName?: string): string;
176
177
  declare function isValidTag(tag: string): boolean;
177
178
  declare function normalizeRef(ref: string): string;
179
+ interface DockerfileLintFinding {
180
+ rule: 'unpinned-base-image' | 'missing-workdir' | 'running-as-root' | 'add-vs-copy';
181
+ severity: 'warning' | 'info';
182
+ line: number;
183
+ message: string;
184
+ }
185
+ interface DockerfileStage {
186
+ index: number;
187
+ name: string | null;
188
+ baseImage: string;
189
+ fromLine: number;
190
+ }
191
+ interface DockerfileLintResult {
192
+ findings: DockerfileLintFinding[];
193
+ stages: DockerfileStage[];
194
+ }
195
+ /**
196
+ * Lint a Dockerfile for 4 common mistakes: a base image with no tag or
197
+ * pinned to `:latest`, a final stage with no WORKDIR, a final stage with no
198
+ * USER (so it runs as root), and ADD used on a plain local file/directory
199
+ * where COPY would do (ADD's extra behavior only makes sense for a remote
200
+ * URL or an auto-extracting archive).
201
+ */
202
+ declare function lintDockerfile(content: string): DockerfileLintResult | {
203
+ error: string;
204
+ };
178
205
  interface JsMinifyOptions {
179
206
  removeComments?: boolean;
180
207
  collapseWhitespace?: boolean;
@@ -780,6 +807,9 @@ type code_DependencyAuditResult = DependencyAuditResult;
780
807
  type code_DependencyRangeType = DependencyRangeType;
781
808
  type code_DependencySection = DependencySection;
782
809
  type code_DockerImageRef = DockerImageRef;
810
+ type code_DockerfileLintFinding = DockerfileLintFinding;
811
+ type code_DockerfileLintResult = DockerfileLintResult;
812
+ type code_DockerfileStage = DockerfileStage;
783
813
  type code_EditorConfigIssue = EditorConfigIssue;
784
814
  type code_EditorConfigProperty = EditorConfigProperty;
785
815
  type code_EditorConfigSection = EditorConfigSection;
@@ -871,6 +901,7 @@ declare const code_getJsStats: typeof getJsStats;
871
901
  declare const code_getMethodColor: typeof getMethodColor;
872
902
  declare const code_isValidTag: typeof isValidTag;
873
903
  declare const code_lintConventionalCommit: typeof lintConventionalCommit;
904
+ declare const code_lintDockerfile: typeof lintDockerfile;
874
905
  declare const code_lookupMime: typeof lookupMime;
875
906
  declare const code_minifyCss: typeof minifyCss;
876
907
  declare const code_minifyGql: typeof minifyGql;
@@ -903,7 +934,7 @@ declare const code_validateFenceLanguageTags: typeof validateFenceLanguageTags;
903
934
  declare const code_validatePackageExports: typeof validatePackageExports;
904
935
  declare const code_validateTsconfig: typeof validateTsconfig;
905
936
  declare namespace code {
906
- export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, type code_AriaIssue as AriaIssue, type code_AriaValidationResult as AriaValidationResult, code_CHEATSHEET as CHEATSHEET, type code_CheatsheetEntry as CheatsheetEntry, type code_CommitTrailer as CommitTrailer, type code_CommitTrailerResult as CommitTrailerResult, type code_ConnectionStringHost as ConnectionStringHost, type code_ConnectionStringResult as ConnectionStringResult, type code_ConventionalCommitFinding as ConventionalCommitFinding, type code_ConventionalCommitFooter as ConventionalCommitFooter, type code_ConventionalCommitOptions as ConventionalCommitOptions, type code_ConventionalCommitParsed as ConventionalCommitParsed, type code_ConventionalCommitResult as ConventionalCommitResult, type code_ConventionalCommitSeverity as ConventionalCommitSeverity, type code_CssResult as CssResult, code_DEFAULT_COMMIT_TYPES as DEFAULT_COMMIT_TYPES, type code_DependencyAuditDuplicate as DependencyAuditDuplicate, type code_DependencyAuditEntry as DependencyAuditEntry, type code_DependencyAuditIssue as DependencyAuditIssue, type code_DependencyAuditResult as DependencyAuditResult, type code_DependencyRangeType as DependencyRangeType, type code_DependencySection as DependencySection, type code_DockerImageRef as DockerImageRef, type code_EditorConfigIssue as EditorConfigIssue, type code_EditorConfigProperty as EditorConfigProperty, type code_EditorConfigSection as EditorConfigSection, type code_EditorConfigValidationResult as EditorConfigValidationResult, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, type code_ExportsIssue as ExportsIssue, type code_ExportsShape as ExportsShape, type code_ExportsValidationResult as ExportsValidationResult, type code_FenceTagIssue as FenceTagIssue, type code_FenceTagIssueType as FenceTagIssueType, type code_FenceValidationResult as FenceValidationResult, type code_GitCommandConfig as GitCommandConfig, type code_GitCommandResult as GitCommandResult, type code_GitOperation as GitOperation, type code_GithubUrlInfo as GithubUrlInfo, type code_GithubUrlType as GithubUrlType, type code_GitignoreTestResult as GitignoreTestResult, type code_GqlFormatResult as GqlFormatResult, type code_HtmlFormatResult as HtmlFormatResult, type code_HtmlMinifyOptions as HtmlMinifyOptions, type code_HtmlMinifyResult as HtmlMinifyResult, type code_JsMinifyOptions as JsMinifyOptions, type code_JsMinifyResult as JsMinifyResult, code_KNOWN_LANGUAGE_TAGS as KNOWN_LANGUAGE_TAGS, type code_LinkReferenceDefinition as LinkReferenceDefinition, type code_LinkReferenceUsage as LinkReferenceUsage, code_MIME_TABLE as MIME_TABLE, type code_MarkdownFootnoteDefinition as MarkdownFootnoteDefinition, type code_MarkdownFootnoteReference as MarkdownFootnoteReference, type code_MarkdownFootnoteResult as MarkdownFootnoteResult, type code_MarkdownLinkReferenceResult as MarkdownLinkReferenceResult, type code_MatchResult as MatchResult, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_PlaceholderStyle as PlaceholderStyle, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexBackreferenceInfo as RegexBackreferenceInfo, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexGroupAnalysis as RegexGroupAnalysis, type code_RegexGroupInfo as RegexGroupInfo, type code_RegexGroupIssue as RegexGroupIssue, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, type code_ResolvedLinkReference as ResolvedLinkReference, code_SQL_DEFAULT_OPTIONS as SQL_DEFAULT_OPTIONS, type code_Segment as Segment, type code_SpecVersion as SpecVersion, type code_SqlDialect as SqlDialect, type code_SqlFormatOptions as SqlFormatOptions, type code_SqlPlaceholder as SqlPlaceholder, type code_SqlPlaceholderResult as SqlPlaceholderResult, type code_SvgSpriteResult as SvgSpriteResult, type code_SvgSpriteSymbol as SvgSpriteSymbol, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_analyzeRegexGroups as analyzeRegexGroups, code_auditDependencyRanges as auditDependencyRanges, code_buildDockerPull as buildDockerPull, code_buildDockerRun as buildDockerRun, code_buildGitCommand as buildGitCommand, code_collapseHtmlWhitespace as collapseHtmlWhitespace, code_collapseJsWhitespace as collapseJsWhitespace, code_countProperties as countProperties, code_countRules as countRules, code_countSqlPlaceholders as countSqlPlaceholders, code_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_extractMarkdownFootnotes as extractMarkdownFootnotes, code_extractMarkdownLinkReferences as extractMarkdownLinkReferences, code_extractSvgSpriteSymbols as extractSvgSpriteSymbols, code_formatCss as formatCss, code_formatGql as formatGql, code_formatHtml as formatHtml, code_formatSql as formatSql, code_getEndpointsByTag as getEndpointsByTag, code_getHtmlStats as getHtmlStats, code_getJsStats as getJsStats, code_getMethodColor as getMethodColor, code_isValidTag as isValidTag, code_lintConventionalCommit as lintConventionalCommit, code_lookupMime as lookupMime, code_minifyCss as minifyCss, code_minifyGql as minifyGql, code_minifyHtml as minifyHtml, code_minifyJs as minifyJs, code_minifySql as minifySql, code_normalizeRef as normalizeRef, code_parseCommitTrailers as parseCommitTrailers, code_parseConnectionString as parseConnectionString, code_parseDockerImage as parseDockerImage, code_parseEnv as parseEnv, code_parseGitCommand as parseGitCommand, code_parseGithubUrl as parseGithubUrl, code_parseSpec as parseSpec, code_removeConsoleCalls as removeConsoleCalls, code_removeEmptyAttributes as removeEmptyAttributes, code_removeHtmlComments as removeHtmlComments, code_removeJsComments as removeJsComments, code_removeRedundantAttributes as removeRedundantAttributes, code_searchCheatsheet as searchCheatsheet, code_searchEndpoints as searchEndpoints, code_splitStatements as splitStatements, code_testGitignorePatterns as testGitignorePatterns, code_testPattern as testPattern, code_testRegex as testRegex, code_validateAria as validateAria, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validateFenceLanguageTags as validateFenceLanguageTags, code_validatePackageExports as validatePackageExports, code_validateTsconfig as validateTsconfig };
937
+ export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, type code_AriaIssue as AriaIssue, type code_AriaValidationResult as AriaValidationResult, code_CHEATSHEET as CHEATSHEET, type code_CheatsheetEntry as CheatsheetEntry, type code_CommitTrailer as CommitTrailer, type code_CommitTrailerResult as CommitTrailerResult, type code_ConnectionStringHost as ConnectionStringHost, type code_ConnectionStringResult as ConnectionStringResult, type code_ConventionalCommitFinding as ConventionalCommitFinding, type code_ConventionalCommitFooter as ConventionalCommitFooter, type code_ConventionalCommitOptions as ConventionalCommitOptions, type code_ConventionalCommitParsed as ConventionalCommitParsed, type code_ConventionalCommitResult as ConventionalCommitResult, type code_ConventionalCommitSeverity as ConventionalCommitSeverity, type code_CssResult as CssResult, code_DEFAULT_COMMIT_TYPES as DEFAULT_COMMIT_TYPES, type code_DependencyAuditDuplicate as DependencyAuditDuplicate, type code_DependencyAuditEntry as DependencyAuditEntry, type code_DependencyAuditIssue as DependencyAuditIssue, type code_DependencyAuditResult as DependencyAuditResult, type code_DependencyRangeType as DependencyRangeType, type code_DependencySection as DependencySection, type code_DockerImageRef as DockerImageRef, type code_DockerfileLintFinding as DockerfileLintFinding, type code_DockerfileLintResult as DockerfileLintResult, type code_DockerfileStage as DockerfileStage, type code_EditorConfigIssue as EditorConfigIssue, type code_EditorConfigProperty as EditorConfigProperty, type code_EditorConfigSection as EditorConfigSection, type code_EditorConfigValidationResult as EditorConfigValidationResult, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, type code_ExportsIssue as ExportsIssue, type code_ExportsShape as ExportsShape, type code_ExportsValidationResult as ExportsValidationResult, type code_FenceTagIssue as FenceTagIssue, type code_FenceTagIssueType as FenceTagIssueType, type code_FenceValidationResult as FenceValidationResult, type code_GitCommandConfig as GitCommandConfig, type code_GitCommandResult as GitCommandResult, type code_GitOperation as GitOperation, type code_GithubUrlInfo as GithubUrlInfo, type code_GithubUrlType as GithubUrlType, type code_GitignoreTestResult as GitignoreTestResult, type code_GqlFormatResult as GqlFormatResult, type code_HtmlFormatResult as HtmlFormatResult, type code_HtmlMinifyOptions as HtmlMinifyOptions, type code_HtmlMinifyResult as HtmlMinifyResult, type code_JsMinifyOptions as JsMinifyOptions, type code_JsMinifyResult as JsMinifyResult, code_KNOWN_LANGUAGE_TAGS as KNOWN_LANGUAGE_TAGS, type code_LinkReferenceDefinition as LinkReferenceDefinition, type code_LinkReferenceUsage as LinkReferenceUsage, code_MIME_TABLE as MIME_TABLE, type code_MarkdownFootnoteDefinition as MarkdownFootnoteDefinition, type code_MarkdownFootnoteReference as MarkdownFootnoteReference, type code_MarkdownFootnoteResult as MarkdownFootnoteResult, type code_MarkdownLinkReferenceResult as MarkdownLinkReferenceResult, type code_MatchResult as MatchResult, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_PlaceholderStyle as PlaceholderStyle, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexBackreferenceInfo as RegexBackreferenceInfo, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexGroupAnalysis as RegexGroupAnalysis, type code_RegexGroupInfo as RegexGroupInfo, type code_RegexGroupIssue as RegexGroupIssue, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, type code_ResolvedLinkReference as ResolvedLinkReference, code_SQL_DEFAULT_OPTIONS as SQL_DEFAULT_OPTIONS, type code_Segment as Segment, type code_SpecVersion as SpecVersion, type code_SqlDialect as SqlDialect, type code_SqlFormatOptions as SqlFormatOptions, type code_SqlPlaceholder as SqlPlaceholder, type code_SqlPlaceholderResult as SqlPlaceholderResult, type code_SvgSpriteResult as SvgSpriteResult, type code_SvgSpriteSymbol as SvgSpriteSymbol, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_analyzeRegexGroups as analyzeRegexGroups, code_auditDependencyRanges as auditDependencyRanges, code_buildDockerPull as buildDockerPull, code_buildDockerRun as buildDockerRun, code_buildGitCommand as buildGitCommand, code_collapseHtmlWhitespace as collapseHtmlWhitespace, code_collapseJsWhitespace as collapseJsWhitespace, code_countProperties as countProperties, code_countRules as countRules, code_countSqlPlaceholders as countSqlPlaceholders, code_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_extractMarkdownFootnotes as extractMarkdownFootnotes, code_extractMarkdownLinkReferences as extractMarkdownLinkReferences, code_extractSvgSpriteSymbols as extractSvgSpriteSymbols, code_formatCss as formatCss, code_formatGql as formatGql, code_formatHtml as formatHtml, code_formatSql as formatSql, code_getEndpointsByTag as getEndpointsByTag, code_getHtmlStats as getHtmlStats, code_getJsStats as getJsStats, code_getMethodColor as getMethodColor, code_isValidTag as isValidTag, code_lintConventionalCommit as lintConventionalCommit, code_lintDockerfile as lintDockerfile, code_lookupMime as lookupMime, code_minifyCss as minifyCss, code_minifyGql as minifyGql, code_minifyHtml as minifyHtml, code_minifyJs as minifyJs, code_minifySql as minifySql, code_normalizeRef as normalizeRef, code_parseCommitTrailers as parseCommitTrailers, code_parseConnectionString as parseConnectionString, code_parseDockerImage as parseDockerImage, code_parseEnv as parseEnv, code_parseGitCommand as parseGitCommand, code_parseGithubUrl as parseGithubUrl, code_parseSpec as parseSpec, code_removeConsoleCalls as removeConsoleCalls, code_removeEmptyAttributes as removeEmptyAttributes, code_removeHtmlComments as removeHtmlComments, code_removeJsComments as removeJsComments, code_removeRedundantAttributes as removeRedundantAttributes, code_searchCheatsheet as searchCheatsheet, code_searchEndpoints as searchEndpoints, code_splitStatements as splitStatements, code_testGitignorePatterns as testGitignorePatterns, code_testPattern as testPattern, code_testRegex as testRegex, code_validateAria as validateAria, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validateFenceLanguageTags as validateFenceLanguageTags, code_validatePackageExports as validatePackageExports, code_validateTsconfig as validateTsconfig };
907
938
  }
908
939
 
909
- export { type LinkReferenceUsage as $, ALL_FLAGS as A, type EditorConfigValidationResult as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EditorConfigIssue as E, type EnvEntry as F, type EnvParseResult as G, type ExportsIssue as H, type ExportsShape as I, type ExportsValidationResult as J, type FenceTagIssue as K, type FenceTagIssueType as L, type FenceValidationResult as M, type GitCommandConfig as N, type GitCommandResult as O, type GitOperation as P, type GithubUrlInfo as Q, type GithubUrlType as R, type GitignoreTestResult as S, type GqlFormatResult as T, type HtmlFormatResult as U, type HtmlMinifyOptions as V, type HtmlMinifyResult as W, type JsMinifyOptions as X, type JsMinifyResult as Y, KNOWN_LANGUAGE_TAGS as Z, type LinkReferenceDefinition as _, type ApiEndpoint as a, lintConventionalCommit as a$, MIME_TABLE as a0, type MarkdownFootnoteDefinition as a1, type MarkdownFootnoteReference as a2, type MarkdownFootnoteResult as a3, type MarkdownLinkReferenceResult as a4, type MatchResult as a5, type MimeEntry as a6, type MimeLookupResult as a7, OPERATIONS as a8, type ParsedSpec as a9, analyzeRegexGroups as aA, auditDependencyRanges as aB, buildDockerPull as aC, buildDockerRun as aD, buildGitCommand as aE, collapseHtmlWhitespace as aF, collapseJsWhitespace as aG, countProperties as aH, countRules as aI, countSqlPlaceholders as aJ, detectDialect as aK, detectOperationType as aL, detectRedos as aM, envToExport as aN, envToJson as aO, extractMarkdownFootnotes as aP, extractMarkdownLinkReferences as aQ, extractSvgSpriteSymbols as aR, formatCss as aS, formatGql as aT, formatHtml as aU, formatSql as aV, getEndpointsByTag as aW, getHtmlStats as aX, getJsStats as aY, getMethodColor as aZ, isValidTag as a_, type PlaceholderStyle as aa, type RedosFinding as ab, type RedosResult as ac, type RedosSeverity as ad, type RegexBackreferenceInfo as ae, type RegexError as af, type RegexFlag as ag, type RegexGroupAnalysis as ah, type RegexGroupInfo as ai, type RegexGroupIssue as aj, type RegexMatch as ak, type RegexResult as al, type RegexSuccess as am, type ResolvedLinkReference as an, SQL_DEFAULT_OPTIONS as ao, type Segment as ap, type SpecVersion as aq, type SqlDialect as ar, type SqlFormatOptions as as, type SqlPlaceholder as at, type SqlPlaceholderResult as au, type SvgSpriteResult as av, type SvgSpriteSymbol as aw, type TestPatternResult as ax, type TsconfigIssue as ay, type TsconfigValidationResult as az, type ApiInfo as b, lookupMime as b0, minifyCss as b1, minifyGql as b2, minifyHtml as b3, minifyJs as b4, minifySql as b5, normalizeRef as b6, parseCommitTrailers as b7, parseConnectionString as b8, parseDockerImage as b9, parseEnv as ba, parseGitCommand as bb, parseGithubUrl as bc, parseSpec as bd, removeConsoleCalls as be, removeEmptyAttributes as bf, removeHtmlComments as bg, removeJsComments as bh, removeRedundantAttributes as bi, searchCheatsheet as bj, searchEndpoints as bk, splitStatements as bl, testGitignorePatterns as bm, testPattern as bn, testRegex as bo, validateAria as bp, validateEditorConfig as bq, validateEnvKey as br, validateFenceLanguageTags as bs, validatePackageExports as bt, validateTsconfig as bu, code as c, type AriaIssue as d, type AriaValidationResult as e, type CheatsheetEntry as f, type CommitTrailer as g, type CommitTrailerResult as h, type ConnectionStringHost as i, type ConnectionStringResult as j, type ConventionalCommitFinding as k, type ConventionalCommitFooter as l, type ConventionalCommitOptions as m, type ConventionalCommitParsed as n, type ConventionalCommitResult as o, type ConventionalCommitSeverity as p, type CssResult as q, type DependencyAuditDuplicate as r, type DependencyAuditEntry as s, type DependencyAuditIssue as t, type DependencyAuditResult as u, type DependencyRangeType as v, type DependencySection as w, type DockerImageRef as x, type EditorConfigProperty as y, type EditorConfigSection as z };
940
+ export { type JsMinifyResult as $, ALL_FLAGS as A, type DockerfileStage as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EditorConfigIssue as E, type EditorConfigProperty as F, type EditorConfigSection as G, type EditorConfigValidationResult as H, type EnvEntry as I, type EnvParseResult as J, type ExportsIssue as K, type ExportsShape as L, type ExportsValidationResult as M, type FenceTagIssue as N, type FenceTagIssueType as O, type FenceValidationResult as P, type GitCommandConfig 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 HtmlFormatResult as X, type HtmlMinifyOptions as Y, type HtmlMinifyResult as Z, type JsMinifyOptions as _, type ApiEndpoint as a, getJsStats as a$, KNOWN_LANGUAGE_TAGS as a0, type LinkReferenceDefinition as a1, type LinkReferenceUsage as a2, MIME_TABLE as a3, type MarkdownFootnoteDefinition as a4, type MarkdownFootnoteReference as a5, type MarkdownFootnoteResult as a6, type MarkdownLinkReferenceResult as a7, type MatchResult as a8, type MimeEntry as a9, type TestPatternResult as aA, type TsconfigIssue as aB, type TsconfigValidationResult as aC, analyzeRegexGroups as aD, auditDependencyRanges as aE, buildDockerPull as aF, buildDockerRun as aG, buildGitCommand as aH, collapseHtmlWhitespace as aI, collapseJsWhitespace as aJ, countProperties as aK, countRules as aL, countSqlPlaceholders as aM, detectDialect as aN, detectOperationType as aO, detectRedos as aP, envToExport as aQ, envToJson as aR, extractMarkdownFootnotes as aS, extractMarkdownLinkReferences as aT, extractSvgSpriteSymbols as aU, formatCss as aV, formatGql as aW, formatHtml as aX, formatSql as aY, getEndpointsByTag as aZ, getHtmlStats as a_, type MimeLookupResult as aa, OPERATIONS as ab, type ParsedSpec as ac, type PlaceholderStyle as ad, type RedosFinding as ae, type RedosResult as af, type RedosSeverity as ag, type RegexBackreferenceInfo as ah, type RegexError as ai, type RegexFlag as aj, type RegexGroupAnalysis as ak, type RegexGroupInfo as al, type RegexGroupIssue as am, type RegexMatch as an, type RegexResult as ao, type RegexSuccess as ap, type ResolvedLinkReference as aq, SQL_DEFAULT_OPTIONS as ar, type Segment as as, type SpecVersion as at, type SqlDialect as au, type SqlFormatOptions as av, type SqlPlaceholder as aw, type SqlPlaceholderResult as ax, type SvgSpriteResult as ay, type SvgSpriteSymbol as az, type ApiInfo as b, getMethodColor as b0, isValidTag as b1, lintConventionalCommit as b2, lintDockerfile as b3, lookupMime as b4, minifyCss as b5, minifyGql as b6, minifyHtml as b7, minifyJs as b8, minifySql as b9, normalizeRef as ba, parseCommitTrailers as bb, parseConnectionString as bc, parseDockerImage as bd, parseEnv as be, parseGitCommand as bf, parseGithubUrl as bg, parseSpec as bh, removeConsoleCalls as bi, removeEmptyAttributes as bj, removeHtmlComments as bk, removeJsComments as bl, removeRedundantAttributes as bm, searchCheatsheet as bn, searchEndpoints as bo, splitStatements as bp, testGitignorePatterns as bq, testPattern as br, testRegex as bs, validateAria as bt, validateEditorConfig as bu, validateEnvKey as bv, validateFenceLanguageTags as bw, validatePackageExports as bx, validateTsconfig as by, code as c, type AriaIssue as d, type AriaValidationResult as e, type CheatsheetEntry as f, type CommitTrailer as g, type CommitTrailerResult as h, type ConnectionStringHost as i, type ConnectionStringResult as j, type ConventionalCommitFinding as k, type ConventionalCommitFooter as l, type ConventionalCommitOptions as m, type ConventionalCommitParsed as n, type ConventionalCommitResult as o, type ConventionalCommitSeverity as p, type CssResult as q, type DependencyAuditDuplicate as r, type DependencyAuditEntry as s, type DependencyAuditIssue as t, type DependencyAuditResult as u, type DependencyRangeType as v, type DependencySection as w, type DockerImageRef as x, type DockerfileLintFinding as y, type DockerfileLintResult as z };