@utilix-tech/sdk 0.63.0 → 0.65.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 +8 -0
- package/README.md +18 -5
- package/dist/{chunk-YTH76KAF.js → chunk-4HNHEOJL.js} +23 -1
- package/dist/{chunk-QY2M2UHJ.js → chunk-HJVSH7FQ.js} +137 -1
- package/dist/{chunk-43L7H3L2.js → chunk-KEZLVYR3.js} +134 -1
- package/dist/{data-vxXrBlWh.d.ts → data-26TALa9U.d.cts} +35 -2
- package/dist/{data-vxXrBlWh.d.cts → data-26TALa9U.d.ts} +35 -2
- package/dist/index.cjs +291 -0
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/{network-DewFJy4E.d.cts → network-DT-OMHWV.d.cts} +73 -2
- package/dist/{network-DewFJy4E.d.ts → network-DT-OMHWV.d.ts} +73 -2
- package/dist/tools/data.cjs +136 -0
- package/dist/tools/data.d.cts +1 -1
- package/dist/tools/data.d.ts +1 -1
- package/dist/tools/data.js +1 -1
- package/dist/tools/network.cjs +133 -0
- package/dist/tools/network.d.cts +1 -1
- package/dist/tools/network.d.ts +1 -1
- package/dist/tools/network.js +1 -1
- package/dist/tools/units.cjs +22 -0
- package/dist/tools/units.d.cts +1 -1
- package/dist/tools/units.d.ts +1 -1
- package/dist/tools/units.js +1 -1
- package/dist/{units-CLJ16Zzv.d.cts → units-DPefgzmH.d.cts} +24 -2
- package/dist/{units-CLJ16Zzv.d.ts → units-DPefgzmH.d.ts} +24 -2
- 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.65.0
|
|
6
|
+
- Add `buildHsts`, `parseHsts` (hsts-header-builder): build a Strict-Transport-Security response header from a max-age plus includeSubDomains/preload flags, flagging combinations that won't qualify for browser HSTS preload lists, or parse an existing header into the same shape.
|
|
7
|
+
- Add `alignMarkdownTables` (markdown-table-aligner): reformat every GitHub-Flavored-Markdown pipe table in a document so each column's pipes line up visually, preserving left/center/right alignment markers and skipping tables inside fenced code blocks.
|
|
8
|
+
|
|
9
|
+
## 0.64.0
|
|
10
|
+
- 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.
|
|
11
|
+
- 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.
|
|
12
|
+
|
|
5
13
|
## 0.63.0
|
|
6
14
|
- 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.
|
|
7
15
|
- 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.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @utilix-tech/sdk
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**678 developer utility functions for Node.js: runs locally, no API key required.**
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@utilix-tech/sdk)
|
|
6
6
|
[](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
|
|
@@ -497,6 +497,10 @@ calculateExtraPaymentPayoff(200000, 6, 360, 200);
|
|
|
497
497
|
// Debt snowball vs avalanche payoff simulation with a fixed extra monthly payment
|
|
498
498
|
planDebtPayoff([{ label: "Credit card", balance: 4000, ratePercent: 22, minPayment: 100 }, { label: "Car loan", balance: 12000, ratePercent: 6, minPayment: 250 }], 200);
|
|
499
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, ... }
|
|
500
504
|
```
|
|
501
505
|
|
|
502
506
|
---
|
|
@@ -514,7 +518,8 @@ import { getStatusCode, isValidIp, isValidIpv4, isValidIpv6,
|
|
|
514
518
|
buildXContentTypeOptionsHeader, parseXContentTypeOptionsHeader, assessContentTypeRisk,
|
|
515
519
|
buildAcceptLanguage, parseAcceptLanguage,
|
|
516
520
|
buildPreferHeader, parsePreferHeader,
|
|
517
|
-
buildRetryAfterHeader, parseRetryAfterHeader
|
|
521
|
+
buildRetryAfterHeader, parseRetryAfterHeader,
|
|
522
|
+
extractMultipartBoundary, parseMultipartFormData } from "@utilix-tech/sdk/network";
|
|
518
523
|
|
|
519
524
|
getStatusCode(404);
|
|
520
525
|
// { code: 404, text: "Not Found", description: "...", category: "Client Error" }
|
|
@@ -663,6 +668,14 @@ lookupCloseCode(1006);
|
|
|
663
668
|
// List every well-known WebSocket close code (1000-1015)
|
|
664
669
|
listCloseCodes();
|
|
665
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"
|
|
666
679
|
```
|
|
667
680
|
|
|
668
681
|
---
|
|
@@ -922,11 +935,11 @@ inspectGifFrames(new Uint8Array(gifBytes));
|
|
|
922
935
|
| `@utilix-tech/sdk/encoding` | Base64, URL, HTML entities, Base32/Base58/Base62 encode/decode |
|
|
923
936
|
| `@utilix-tech/sdk/hashing` | MD5, SHA-1/256/512, bcrypt, HMAC, .htpasswd, SRI hashes, content-hash ETag generation |
|
|
924
937
|
| `@utilix-tech/sdk/text` | Case convert, slugify, word count, lorem ipsum, line ops, HTML→Markdown, Levenshtein/Damerau string distance, readability scoring, sentence length distribution, emoji lookup |
|
|
925
|
-
| `@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 |
|
|
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, Markdown table column aligner |
|
|
926
939
|
| `@utilix-tech/sdk/generators` | UUID v4/v7, ULID, passwords, strength check, entropy estimator, fake data, CSP nonce generator |
|
|
927
940
|
| `@utilix-tech/sdk/time` | Date diff, timezone convert, cron parse, relative time |
|
|
928
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 |
|
|
929
|
-
| `@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 |
|
|
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, Strict-Transport-Security (HSTS) header builder/parser |
|
|
930
943
|
| `@utilix-tech/sdk/api` | cURL build/parse, JWT decode/sign, JWKS parse, CORS headers, CSP header |
|
|
931
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 |
|
|
932
945
|
| `@utilix-tech/sdk/color` | Hex/RGB/HSL/HSV/CMYK convert, palette generation, contrast check |
|
|
@@ -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,
|
|
@@ -2481,5 +2482,26 @@ function planDebtPayoff(debts, extraMonthlyPayment = 0) {
|
|
|
2481
2482
|
}
|
|
2482
2483
|
};
|
|
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
|
+
}
|
|
2484
2506
|
|
|
2485
|
-
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, planDebtPayoff, 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 };
|
|
@@ -5,6 +5,7 @@ import { parse, stringify } from 'smol-toml';
|
|
|
5
5
|
// src/tools/data.ts
|
|
6
6
|
var data_exports = {};
|
|
7
7
|
__export(data_exports, {
|
|
8
|
+
alignMarkdownTables: () => alignMarkdownTables,
|
|
8
9
|
analyzeCaptionSpeed: () => analyzeCaptionSpeed,
|
|
9
10
|
calculateMarkdownTaskListProgress: () => calculateMarkdownTaskListProgress,
|
|
10
11
|
convertSubtitles: () => convertSubtitles,
|
|
@@ -1807,5 +1808,140 @@ function calculateMarkdownTaskListProgress(markdown) {
|
|
|
1807
1808
|
});
|
|
1808
1809
|
return { totalItems, completedItems, percentComplete, sections, items };
|
|
1809
1810
|
}
|
|
1811
|
+
function _splitMarkdownTableRow(line) {
|
|
1812
|
+
const raw = [];
|
|
1813
|
+
let current = "";
|
|
1814
|
+
for (let i = 0; i < line.length; i++) {
|
|
1815
|
+
const ch = line[i];
|
|
1816
|
+
if (ch === "\\" && line[i + 1] === "|") {
|
|
1817
|
+
current += "\\|";
|
|
1818
|
+
i++;
|
|
1819
|
+
continue;
|
|
1820
|
+
}
|
|
1821
|
+
if (ch === "|") {
|
|
1822
|
+
raw.push(current);
|
|
1823
|
+
current = "";
|
|
1824
|
+
continue;
|
|
1825
|
+
}
|
|
1826
|
+
current += ch;
|
|
1827
|
+
}
|
|
1828
|
+
raw.push(current);
|
|
1829
|
+
const cells = raw.map((c) => c.trim());
|
|
1830
|
+
if (cells.length > 1 && cells[0] === "") cells.shift();
|
|
1831
|
+
if (cells.length > 1 && cells[cells.length - 1] === "") cells.pop();
|
|
1832
|
+
return cells;
|
|
1833
|
+
}
|
|
1834
|
+
function _isMarkdownTableDelimiterRow(line) {
|
|
1835
|
+
const trimmed = line.trim();
|
|
1836
|
+
if (trimmed === "" || !trimmed.includes("-")) return false;
|
|
1837
|
+
const cells = _splitMarkdownTableRow(trimmed);
|
|
1838
|
+
if (cells.length === 0) return false;
|
|
1839
|
+
return cells.every((c) => /^:?-+:?$/.test(c));
|
|
1840
|
+
}
|
|
1841
|
+
function _markdownTableCellAlignment(delimCell) {
|
|
1842
|
+
const left = delimCell.startsWith(":");
|
|
1843
|
+
const right = delimCell.endsWith(":");
|
|
1844
|
+
if (left && right) return "center";
|
|
1845
|
+
if (right) return "right";
|
|
1846
|
+
if (left) return "left";
|
|
1847
|
+
return "none";
|
|
1848
|
+
}
|
|
1849
|
+
function _padMarkdownTableCell(text, width, alignment) {
|
|
1850
|
+
const len = [...text].length;
|
|
1851
|
+
const diff = Math.max(0, width - len);
|
|
1852
|
+
if (alignment === "right") return " ".repeat(diff) + text;
|
|
1853
|
+
if (alignment === "center") {
|
|
1854
|
+
const left = Math.floor(diff / 2);
|
|
1855
|
+
const right = diff - left;
|
|
1856
|
+
return " ".repeat(left) + text + " ".repeat(right);
|
|
1857
|
+
}
|
|
1858
|
+
return text + " ".repeat(diff);
|
|
1859
|
+
}
|
|
1860
|
+
function _markdownTableDelimiterCell(width, alignment) {
|
|
1861
|
+
switch (alignment) {
|
|
1862
|
+
case "left":
|
|
1863
|
+
return ":" + "-".repeat(Math.max(1, width - 1));
|
|
1864
|
+
case "right":
|
|
1865
|
+
return "-".repeat(Math.max(1, width - 1)) + ":";
|
|
1866
|
+
case "center":
|
|
1867
|
+
return ":" + "-".repeat(Math.max(1, width - 2)) + ":";
|
|
1868
|
+
default:
|
|
1869
|
+
return "-".repeat(width);
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
function alignMarkdownTables(markdown) {
|
|
1873
|
+
if (typeof markdown !== "string") return { error: "markdown must be a string" };
|
|
1874
|
+
const lines = markdown.replace(/\r\n/g, "\n").split("\n");
|
|
1875
|
+
const outputLines = [...lines];
|
|
1876
|
+
const tables = [];
|
|
1877
|
+
const warnings = [];
|
|
1878
|
+
let inFence = false;
|
|
1879
|
+
let fenceMarker = "";
|
|
1880
|
+
let i = 0;
|
|
1881
|
+
while (i < lines.length) {
|
|
1882
|
+
const line = lines[i];
|
|
1883
|
+
const fenceMatch = line.match(/^\s*(```+|~~~+)/);
|
|
1884
|
+
if (fenceMatch) {
|
|
1885
|
+
if (!inFence) {
|
|
1886
|
+
inFence = true;
|
|
1887
|
+
fenceMarker = fenceMatch[1][0];
|
|
1888
|
+
} else if (fenceMatch[1][0] === fenceMarker) {
|
|
1889
|
+
inFence = false;
|
|
1890
|
+
}
|
|
1891
|
+
i++;
|
|
1892
|
+
continue;
|
|
1893
|
+
}
|
|
1894
|
+
if (inFence) {
|
|
1895
|
+
i++;
|
|
1896
|
+
continue;
|
|
1897
|
+
}
|
|
1898
|
+
const nextLine = lines[i + 1];
|
|
1899
|
+
if (line.includes("|") && nextLine !== void 0 && _isMarkdownTableDelimiterRow(nextLine)) {
|
|
1900
|
+
const headerCells = _splitMarkdownTableRow(line);
|
|
1901
|
+
const delimCells = _splitMarkdownTableRow(nextLine);
|
|
1902
|
+
if (headerCells.length > 0 && headerCells.length === delimCells.length) {
|
|
1903
|
+
const columnCount = headerCells.length;
|
|
1904
|
+
const alignments = delimCells.map(_markdownTableCellAlignment);
|
|
1905
|
+
let j = i + 2;
|
|
1906
|
+
const bodyRows = [];
|
|
1907
|
+
while (j < lines.length && lines[j].trim() !== "" && lines[j].includes("|")) {
|
|
1908
|
+
bodyRows.push(_splitMarkdownTableRow(lines[j]));
|
|
1909
|
+
j++;
|
|
1910
|
+
}
|
|
1911
|
+
const normalizedBody = [];
|
|
1912
|
+
for (const row of bodyRows) {
|
|
1913
|
+
if (row.length !== columnCount) {
|
|
1914
|
+
warnings.push(`Table at line ${i + 1}: a row has ${row.length} cell(s) but the header has ${columnCount}; it was padded/truncated to match.`);
|
|
1915
|
+
}
|
|
1916
|
+
normalizedBody.push(Array.from({ length: columnCount }, (_, c) => row[c] ?? ""));
|
|
1917
|
+
}
|
|
1918
|
+
const allRows = [headerCells, ...normalizedBody];
|
|
1919
|
+
const widths = Array.from(
|
|
1920
|
+
{ length: columnCount },
|
|
1921
|
+
(_, c) => Math.max(3, ...allRows.map((r) => [...r[c] ?? ""].length))
|
|
1922
|
+
);
|
|
1923
|
+
const formattedHeader = "| " + headerCells.map((c, idx) => _padMarkdownTableCell(c, widths[idx], alignments[idx])).join(" | ") + " |";
|
|
1924
|
+
const formattedDelim = "| " + widths.map((w, idx) => _markdownTableDelimiterCell(w, alignments[idx])).join(" | ") + " |";
|
|
1925
|
+
const formattedBody = normalizedBody.map((row) => "| " + row.map((c, idx) => _padMarkdownTableCell(c, widths[idx], alignments[idx])).join(" | ") + " |");
|
|
1926
|
+
const formattedLines = [formattedHeader, formattedDelim, ...formattedBody];
|
|
1927
|
+
for (let k = 0; k < formattedLines.length; k++) {
|
|
1928
|
+
outputLines[i + k] = formattedLines[k];
|
|
1929
|
+
}
|
|
1930
|
+
tables.push({
|
|
1931
|
+
startLine: i + 1,
|
|
1932
|
+
endLine: i + formattedLines.length,
|
|
1933
|
+
columnCount,
|
|
1934
|
+
rowCount: normalizedBody.length,
|
|
1935
|
+
alignments
|
|
1936
|
+
});
|
|
1937
|
+
i = j;
|
|
1938
|
+
continue;
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
i++;
|
|
1942
|
+
}
|
|
1943
|
+
if (tables.length === 0) return { error: "No Markdown tables found" };
|
|
1944
|
+
return { output: outputLines.join("\n"), tables, warnings };
|
|
1945
|
+
}
|
|
1810
1946
|
|
|
1811
|
-
export { analyzeCaptionSpeed, calculateMarkdownTaskListProgress, convertSubtitles, csvToJson, csvToSqlInsert, data_exports, dedupeNdjson, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, findCsvDuplicateRows, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, inferCsvColumnTypes, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, resolveYamlAnchors, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson };
|
|
1947
|
+
export { alignMarkdownTables, analyzeCaptionSpeed, calculateMarkdownTaskListProgress, convertSubtitles, csvToJson, csvToSqlInsert, data_exports, dedupeNdjson, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, findCsvDuplicateRows, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, inferCsvColumnTypes, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, resolveYamlAnchors, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson };
|
|
@@ -19,6 +19,7 @@ __export(network_exports, {
|
|
|
19
19
|
buildContentDisposition: () => buildContentDisposition,
|
|
20
20
|
buildDnsQueryUrl: () => buildDnsQueryUrl,
|
|
21
21
|
buildGeoUrl: () => buildGeoUrl,
|
|
22
|
+
buildHsts: () => buildHsts,
|
|
22
23
|
buildLinkHeader: () => buildLinkHeader,
|
|
23
24
|
buildMapUrl: () => buildMapUrl,
|
|
24
25
|
buildPermissionsPolicy: () => buildPermissionsPolicy,
|
|
@@ -31,6 +32,7 @@ __export(network_exports, {
|
|
|
31
32
|
buildXContentTypeOptionsHeader: () => buildXContentTypeOptionsHeader,
|
|
32
33
|
checkSetCookieHeader: () => checkSetCookieHeader,
|
|
33
34
|
countryCodeToFlag: () => countryCodeToFlag,
|
|
35
|
+
extractMultipartBoundary: () => extractMultipartBoundary,
|
|
34
36
|
formatCoordinates: () => formatCoordinates,
|
|
35
37
|
formatTtl: () => formatTtl,
|
|
36
38
|
getByCategory: () => getByCategory,
|
|
@@ -53,7 +55,9 @@ __export(network_exports, {
|
|
|
53
55
|
parseDnsResponse: () => parseDnsResponse,
|
|
54
56
|
parseGeoResponse: () => parseGeoResponse,
|
|
55
57
|
parseHar: () => parseHar,
|
|
58
|
+
parseHsts: () => parseHsts,
|
|
56
59
|
parseIpv6Address: () => parseIpv6Address,
|
|
60
|
+
parseMultipartFormData: () => parseMultipartFormData,
|
|
57
61
|
parsePermissionsPolicy: () => parsePermissionsPolicy,
|
|
58
62
|
parsePreferHeader: () => parsePreferHeader,
|
|
59
63
|
parsePriorityHeader: () => parsePriorityHeader,
|
|
@@ -3114,5 +3118,134 @@ function lookupCloseCode(code) {
|
|
|
3114
3118
|
}
|
|
3115
3119
|
return { error: `${code} is outside the defined close code ranges (0-4999); codes 5000 and above have no assigned meaning` };
|
|
3116
3120
|
}
|
|
3121
|
+
function extractMultipartBoundary(contentType) {
|
|
3122
|
+
if (!contentType) return null;
|
|
3123
|
+
const match = contentType.match(/boundary=(?:"([^"]*)"|([^;\s]+))/i);
|
|
3124
|
+
if (!match) return null;
|
|
3125
|
+
return match[1] ?? match[2] ?? null;
|
|
3126
|
+
}
|
|
3127
|
+
function parseMultipartFormData(body, boundary) {
|
|
3128
|
+
if (!body || !body.trim()) return { error: "Body is empty" };
|
|
3129
|
+
if (!boundary || !boundary.trim()) return { error: "Boundary is required" };
|
|
3130
|
+
const normalized = body.replace(/\r\n/g, "\n");
|
|
3131
|
+
const delimiter = `--${boundary}`;
|
|
3132
|
+
const segments = normalized.split(delimiter);
|
|
3133
|
+
if (segments.length < 3) {
|
|
3134
|
+
return { error: `No parts found for boundary "${boundary}"; check that it matches the boundary used in the body` };
|
|
3135
|
+
}
|
|
3136
|
+
const parts = [];
|
|
3137
|
+
for (let i = 1; i < segments.length; i++) {
|
|
3138
|
+
let segment = segments[i];
|
|
3139
|
+
if (segment.startsWith("--")) break;
|
|
3140
|
+
segment = segment.replace(/^\n/, "").replace(/\n$/, "");
|
|
3141
|
+
const headerEnd = segment.indexOf("\n\n");
|
|
3142
|
+
if (headerEnd === -1) continue;
|
|
3143
|
+
const headerBlock = segment.slice(0, headerEnd);
|
|
3144
|
+
const value = segment.slice(headerEnd + 2);
|
|
3145
|
+
const headers = {};
|
|
3146
|
+
for (const line of headerBlock.split("\n")) {
|
|
3147
|
+
const colon = line.indexOf(":");
|
|
3148
|
+
if (colon === -1) continue;
|
|
3149
|
+
headers[line.slice(0, colon).trim().toLowerCase()] = line.slice(colon + 1).trim();
|
|
3150
|
+
}
|
|
3151
|
+
const disposition = headers["content-disposition"] ?? "";
|
|
3152
|
+
const nameMatch = disposition.match(/name="([^"]*)"/);
|
|
3153
|
+
const filenameMatch = disposition.match(/filename="([^"]*)"/);
|
|
3154
|
+
const partContentType = headers["content-type"] ?? "";
|
|
3155
|
+
const isBinary = !!filenameMatch && !partContentType.startsWith("text/") && !partContentType.includes("json") && !partContentType.includes("xml");
|
|
3156
|
+
parts.push({
|
|
3157
|
+
name: nameMatch ? nameMatch[1] : null,
|
|
3158
|
+
filename: filenameMatch ? filenameMatch[1] : null,
|
|
3159
|
+
headers,
|
|
3160
|
+
value,
|
|
3161
|
+
isBinary
|
|
3162
|
+
});
|
|
3163
|
+
}
|
|
3164
|
+
if (parts.length === 0) {
|
|
3165
|
+
return { error: `No parts found for boundary "${boundary}"; check that it matches the boundary used in the body` };
|
|
3166
|
+
}
|
|
3167
|
+
return { boundary, parts };
|
|
3168
|
+
}
|
|
3169
|
+
var HSTS_ONE_YEAR_SECONDS = 31536e3;
|
|
3170
|
+
function _humanizeHstsMaxAge(seconds) {
|
|
3171
|
+
if (seconds === 0) return "0 seconds (clears HSTS)";
|
|
3172
|
+
if (seconds % HSTS_ONE_YEAR_SECONDS === 0) {
|
|
3173
|
+
const years = seconds / HSTS_ONE_YEAR_SECONDS;
|
|
3174
|
+
return `${years} year${years === 1 ? "" : "s"}`;
|
|
3175
|
+
}
|
|
3176
|
+
if (seconds % 86400 === 0) {
|
|
3177
|
+
const days = seconds / 86400;
|
|
3178
|
+
return `${days} day${days === 1 ? "" : "s"}`;
|
|
3179
|
+
}
|
|
3180
|
+
if (seconds % 3600 === 0) {
|
|
3181
|
+
const hours = seconds / 3600;
|
|
3182
|
+
return `${hours} hour${hours === 1 ? "" : "s"}`;
|
|
3183
|
+
}
|
|
3184
|
+
return `${seconds} second${seconds === 1 ? "" : "s"}`;
|
|
3185
|
+
}
|
|
3186
|
+
function buildHsts(options) {
|
|
3187
|
+
if (!options || typeof options !== "object") return { error: "maxAge is required" };
|
|
3188
|
+
const { maxAge, includeSubDomains = false, preload = false } = options;
|
|
3189
|
+
if (typeof maxAge !== "number" || !Number.isFinite(maxAge) || !Number.isInteger(maxAge) || maxAge < 0) {
|
|
3190
|
+
return { error: "maxAge must be a non-negative integer number of seconds" };
|
|
3191
|
+
}
|
|
3192
|
+
const warnings = [];
|
|
3193
|
+
const preloadEligible = maxAge >= HSTS_ONE_YEAR_SECONDS && includeSubDomains && preload;
|
|
3194
|
+
if (preload && !includeSubDomains) {
|
|
3195
|
+
warnings.push("Browser HSTS preload lists require includeSubDomains whenever preload is set; this header will not qualify for preloading as configured.");
|
|
3196
|
+
}
|
|
3197
|
+
if (preload && maxAge < HSTS_ONE_YEAR_SECONDS) {
|
|
3198
|
+
warnings.push(`Browser HSTS preload lists require max-age of at least ${HSTS_ONE_YEAR_SECONDS} (1 year); ${maxAge} is too low to qualify.`);
|
|
3199
|
+
}
|
|
3200
|
+
if (maxAge === 0) {
|
|
3201
|
+
warnings.push("max-age=0 tells the browser to forget this host supports HSTS immediately, this clears HSTS rather than enabling it.");
|
|
3202
|
+
} else if (maxAge < 86400) {
|
|
3203
|
+
warnings.push("A max-age under a day gives very little protection; most real deployments use at least 15552000 (180 days) once confident HTTPS is fully working.");
|
|
3204
|
+
}
|
|
3205
|
+
const parts = [`max-age=${maxAge}`];
|
|
3206
|
+
if (includeSubDomains) parts.push("includeSubDomains");
|
|
3207
|
+
if (preload) parts.push("preload");
|
|
3208
|
+
const header = parts.join("; ");
|
|
3209
|
+
return {
|
|
3210
|
+
header,
|
|
3211
|
+
headerName: "Strict-Transport-Security",
|
|
3212
|
+
snippet: `Strict-Transport-Security: ${header}`,
|
|
3213
|
+
maxAge,
|
|
3214
|
+
maxAgeHuman: _humanizeHstsMaxAge(maxAge),
|
|
3215
|
+
includeSubDomains,
|
|
3216
|
+
preload,
|
|
3217
|
+
preloadEligible,
|
|
3218
|
+
warnings
|
|
3219
|
+
};
|
|
3220
|
+
}
|
|
3221
|
+
function parseHsts(raw) {
|
|
3222
|
+
if (!raw || raw.trim() === "") return { error: "Input is empty" };
|
|
3223
|
+
const withoutLabel = raw.trim().replace(/^strict-transport-security:\s*/i, "");
|
|
3224
|
+
const tokens = withoutLabel.split(";").map((t) => t.trim()).filter((t) => t !== "");
|
|
3225
|
+
if (tokens.length === 0) return { error: "No directives found" };
|
|
3226
|
+
let maxAge = null;
|
|
3227
|
+
let includeSubDomains = false;
|
|
3228
|
+
let preload = false;
|
|
3229
|
+
for (const token of tokens) {
|
|
3230
|
+
const eq = token.indexOf("=");
|
|
3231
|
+
const name = (eq === -1 ? token : token.slice(0, eq)).trim().toLowerCase();
|
|
3232
|
+
if (name === "max-age") {
|
|
3233
|
+
const rawValue = eq === -1 ? "" : token.slice(eq + 1).trim();
|
|
3234
|
+
const n = Number(rawValue);
|
|
3235
|
+
if (rawValue === "" || !Number.isFinite(n) || !Number.isInteger(n) || n < 0) {
|
|
3236
|
+
return { error: `max-age value "${rawValue}" is not a valid non-negative integer` };
|
|
3237
|
+
}
|
|
3238
|
+
maxAge = n;
|
|
3239
|
+
} else if (name === "includesubdomains") {
|
|
3240
|
+
includeSubDomains = true;
|
|
3241
|
+
} else if (name === "preload") {
|
|
3242
|
+
preload = true;
|
|
3243
|
+
} else {
|
|
3244
|
+
return { error: `Unrecognized directive "${token}"` };
|
|
3245
|
+
}
|
|
3246
|
+
}
|
|
3247
|
+
if (maxAge === null) return { error: "max-age directive is required" };
|
|
3248
|
+
return buildHsts({ maxAge, includeSubDomains, preload });
|
|
3249
|
+
}
|
|
3117
3250
|
|
|
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 };
|
|
3251
|
+
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, buildHsts, 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, parseHsts, parseIpv6Address, parseMultipartFormData, parsePermissionsPolicy, parsePreferHeader, parsePriorityHeader, parseRetryAfterHeader, parseUserAgent, parseVaryHeader, parseXContentTypeOptionsHeader, searchHeaders, searchStatusCodes, splitSitemap, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateManifest, validateRobotsTxt, validateSitemap };
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* - csv-to-sql-insert-generator: csvToSqlInsert
|
|
20
20
|
* - csv-duplicate-row-finder: findCsvDuplicateRows
|
|
21
21
|
* - yaml-anchor-resolver: resolveYamlAnchors
|
|
22
|
+
* - markdown-table-aligner: alignMarkdownTables
|
|
22
23
|
*/
|
|
23
24
|
interface ValidationResult {
|
|
24
25
|
valid: boolean;
|
|
@@ -504,6 +505,34 @@ interface MarkdownTaskListProgressResult {
|
|
|
504
505
|
declare function calculateMarkdownTaskListProgress(markdown: string): MarkdownTaskListProgressResult | {
|
|
505
506
|
error: string;
|
|
506
507
|
};
|
|
508
|
+
type MarkdownTableColumnAlignment = 'left' | 'center' | 'right' | 'none';
|
|
509
|
+
interface MarkdownTableInfo {
|
|
510
|
+
startLine: number;
|
|
511
|
+
endLine: number;
|
|
512
|
+
columnCount: number;
|
|
513
|
+
rowCount: number;
|
|
514
|
+
alignments: MarkdownTableColumnAlignment[];
|
|
515
|
+
}
|
|
516
|
+
interface MarkdownTableAlignResult {
|
|
517
|
+
output: string;
|
|
518
|
+
tables: MarkdownTableInfo[];
|
|
519
|
+
warnings: string[];
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Reformat every GitHub-Flavored-Markdown pipe table in a document so each
|
|
523
|
+
* column's pipes line up visually, padding cells to the widest content in
|
|
524
|
+
* that column and rebuilding the delimiter row's dashes/colons to match,
|
|
525
|
+
* while preserving each column's declared alignment. Tables inside fenced
|
|
526
|
+
* code blocks are left untouched, matching how GitHub's own renderer treats
|
|
527
|
+
* them as literal text rather than a real table. A row with a different
|
|
528
|
+
* cell count than the header is padded or truncated to match, with a
|
|
529
|
+
* warning. Column width is measured in characters (not rendered pixel
|
|
530
|
+
* width), so tables with wide-character (e.g. CJK) content may not align
|
|
531
|
+
* pixel-perfectly even though the character counts match.
|
|
532
|
+
*/
|
|
533
|
+
declare function alignMarkdownTables(markdown: string): MarkdownTableAlignResult | {
|
|
534
|
+
error: string;
|
|
535
|
+
};
|
|
507
536
|
|
|
508
537
|
type data_CaptionSpeedCue = CaptionSpeedCue;
|
|
509
538
|
type data_CaptionSpeedResult = CaptionSpeedResult;
|
|
@@ -525,6 +554,9 @@ type data_EnvParseResult = EnvParseResult;
|
|
|
525
554
|
type data_FrontMatterError = FrontMatterError;
|
|
526
555
|
type data_FrontMatterResult = FrontMatterResult;
|
|
527
556
|
type data_IniSection = IniSection;
|
|
557
|
+
type data_MarkdownTableAlignResult = MarkdownTableAlignResult;
|
|
558
|
+
type data_MarkdownTableColumnAlignment = MarkdownTableColumnAlignment;
|
|
559
|
+
type data_MarkdownTableInfo = MarkdownTableInfo;
|
|
528
560
|
type data_MarkdownTaskListItem = MarkdownTaskListItem;
|
|
529
561
|
type data_MarkdownTaskListProgressResult = MarkdownTaskListProgressResult;
|
|
530
562
|
type data_MarkdownTaskListSectionSummary = MarkdownTaskListSectionSummary;
|
|
@@ -546,6 +578,7 @@ type data_XmlToJsonOptions = XmlToJsonOptions;
|
|
|
546
578
|
type data_YamlAnchorInfo = YamlAnchorInfo;
|
|
547
579
|
type data_YamlAnchorResolveError = YamlAnchorResolveError;
|
|
548
580
|
type data_YamlAnchorResolveResult = YamlAnchorResolveResult;
|
|
581
|
+
declare const data_alignMarkdownTables: typeof alignMarkdownTables;
|
|
549
582
|
declare const data_analyzeCaptionSpeed: typeof analyzeCaptionSpeed;
|
|
550
583
|
declare const data_calculateMarkdownTaskListProgress: typeof calculateMarkdownTaskListProgress;
|
|
551
584
|
declare const data_convertSubtitles: typeof convertSubtitles;
|
|
@@ -599,7 +632,7 @@ declare const data_validateXml: typeof validateXml;
|
|
|
599
632
|
declare const data_validateYaml: typeof validateYaml;
|
|
600
633
|
declare const data_xmlToJson: typeof xmlToJson;
|
|
601
634
|
declare namespace data {
|
|
602
|
-
export { type data_CaptionSpeedCue as CaptionSpeedCue, type data_CaptionSpeedResult as CaptionSpeedResult, type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvColumnType as CsvColumnType, type data_CsvColumnTypeInfo as CsvColumnTypeInfo, type data_CsvColumnTypeOptions as CsvColumnTypeOptions, type data_CsvColumnTypeResult as CsvColumnTypeResult, type data_CsvDuplicateGroup as CsvDuplicateGroup, type data_CsvDuplicateOptions as CsvDuplicateOptions, type data_CsvDuplicateResult as CsvDuplicateResult, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTaskListItem as MarkdownTaskListItem, type data_MarkdownTaskListProgressResult as MarkdownTaskListProgressResult, type data_MarkdownTaskListSectionSummary as MarkdownTaskListSectionSummary, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonDedupeResult as NdjsonDedupeResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, type data_YamlAnchorInfo as YamlAnchorInfo, type data_YamlAnchorResolveError as YamlAnchorResolveError, type data_YamlAnchorResolveResult as YamlAnchorResolveResult, data_analyzeCaptionSpeed as analyzeCaptionSpeed, data_calculateMarkdownTaskListProgress as calculateMarkdownTaskListProgress, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_dedupeNdjson as dedupeNdjson, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_findCsvDuplicateRows as findCsvDuplicateRows, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_inferCsvColumnTypes as inferCsvColumnTypes, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_resolveYamlAnchors as resolveYamlAnchors, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
635
|
+
export { type data_CaptionSpeedCue as CaptionSpeedCue, type data_CaptionSpeedResult as CaptionSpeedResult, type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvColumnType as CsvColumnType, type data_CsvColumnTypeInfo as CsvColumnTypeInfo, type data_CsvColumnTypeOptions as CsvColumnTypeOptions, type data_CsvColumnTypeResult as CsvColumnTypeResult, type data_CsvDuplicateGroup as CsvDuplicateGroup, type data_CsvDuplicateOptions as CsvDuplicateOptions, type data_CsvDuplicateResult as CsvDuplicateResult, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTableAlignResult as MarkdownTableAlignResult, type data_MarkdownTableColumnAlignment as MarkdownTableColumnAlignment, type data_MarkdownTableInfo as MarkdownTableInfo, type data_MarkdownTaskListItem as MarkdownTaskListItem, type data_MarkdownTaskListProgressResult as MarkdownTaskListProgressResult, type data_MarkdownTaskListSectionSummary as MarkdownTaskListSectionSummary, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonDedupeResult as NdjsonDedupeResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, type data_YamlAnchorInfo as YamlAnchorInfo, type data_YamlAnchorResolveError as YamlAnchorResolveError, type data_YamlAnchorResolveResult as YamlAnchorResolveResult, data_alignMarkdownTables as alignMarkdownTables, data_analyzeCaptionSpeed as analyzeCaptionSpeed, data_calculateMarkdownTaskListProgress as calculateMarkdownTaskListProgress, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_dedupeNdjson as dedupeNdjson, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_findCsvDuplicateRows as findCsvDuplicateRows, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_inferCsvColumnTypes as inferCsvColumnTypes, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_resolveYamlAnchors as resolveYamlAnchors, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
603
636
|
}
|
|
604
637
|
|
|
605
|
-
export {
|
|
638
|
+
export { detectSubtitleFormat as $, type NdjsonValidateResult as A, type ParsedIni as B, type CaptionSpeedCue as C, type ParsedSubtitles as D, type EnvDiffError as E, type FrontMatterError as F, type SubtitleFormat as G, type XmlToJsonOptions as H, type IniSection as I, type YamlAnchorResolveError as J, type YamlAnchorResolveResult as K, alignMarkdownTables as L, type MarkdownTableAlignResult as M, type NdjsonDedupeResult as N, analyzeCaptionSpeed as O, type ParseOptions as P, calculateMarkdownTaskListProgress as Q, convertSubtitles as R, type SubtitleCue as S, type TomlFormatResult as T, csvToJson as U, type ValidationResult as V, csvToSqlInsert as W, type XmlFormatResult as X, type YamlAnchorInfo as Y, dedupeNdjson as Z, detectDelimiter as _, type CaptionSpeedResult as a, diffEnvExample as a0, envToExport as a1, envToJson as a2, findCsvDuplicateRows as a3, formatNdjson as a4, formatSubtitleTimestamp as a5, formatToml as a6, formatXml as a7, generateMarkdownToc as a8, getSection as a9, tomlToJson as aA, validateEnvKey as aB, validateIni as aC, validateNdjson as aD, validateToml as aE, validateXml as aF, validateYaml as aG, xmlToJson as aH, getSectionNames as aa, getTomlStats as ab, getXmlStats as ac, getYamlStats as ad, inferCsvColumnTypes as ae, iniToJson as af, jsonArrayToNdjson as ag, jsonToIni as ah, jsonToToml as ai, jsonToXml as aj, minifyNdjson as ak, minifyToml as al, minifyXml as am, ndjsonToJsonArray as an, parseCsv as ao, parseEnv as ap, parseFrontMatter as aq, parseIni as ar, parseSubtitleTimestamp as as, parseSubtitles as at, parseXmlToObject as au, resolveYamlAnchors as av, serializeSubtitles as aw, shiftSubtitles as ax, stringifyIni as ay, toCsvString as az, type ConvertedSubtitles as b, type CsvColumnType as c, data as d, type CsvColumnTypeInfo as e, type CsvColumnTypeOptions as f, type CsvColumnTypeResult as g, type CsvDuplicateGroup as h, type CsvDuplicateOptions as i, type CsvDuplicateResult as j, type CsvParseResult as k, type CsvToSqlOptions as l, type CsvToSqlResult as m, type EnvDiffResult as n, type EnvEntry as o, type EnvParseResult as p, type FrontMatterResult as q, type MarkdownTableColumnAlignment as r, type MarkdownTableInfo as s, type MarkdownTaskListItem as t, type MarkdownTaskListProgressResult as u, type MarkdownTaskListSectionSummary as v, type MarkdownTocEntry as w, type MarkdownTocOptions as x, type MarkdownTocResult as y, type NdjsonLineResult as z };
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* - csv-to-sql-insert-generator: csvToSqlInsert
|
|
20
20
|
* - csv-duplicate-row-finder: findCsvDuplicateRows
|
|
21
21
|
* - yaml-anchor-resolver: resolveYamlAnchors
|
|
22
|
+
* - markdown-table-aligner: alignMarkdownTables
|
|
22
23
|
*/
|
|
23
24
|
interface ValidationResult {
|
|
24
25
|
valid: boolean;
|
|
@@ -504,6 +505,34 @@ interface MarkdownTaskListProgressResult {
|
|
|
504
505
|
declare function calculateMarkdownTaskListProgress(markdown: string): MarkdownTaskListProgressResult | {
|
|
505
506
|
error: string;
|
|
506
507
|
};
|
|
508
|
+
type MarkdownTableColumnAlignment = 'left' | 'center' | 'right' | 'none';
|
|
509
|
+
interface MarkdownTableInfo {
|
|
510
|
+
startLine: number;
|
|
511
|
+
endLine: number;
|
|
512
|
+
columnCount: number;
|
|
513
|
+
rowCount: number;
|
|
514
|
+
alignments: MarkdownTableColumnAlignment[];
|
|
515
|
+
}
|
|
516
|
+
interface MarkdownTableAlignResult {
|
|
517
|
+
output: string;
|
|
518
|
+
tables: MarkdownTableInfo[];
|
|
519
|
+
warnings: string[];
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Reformat every GitHub-Flavored-Markdown pipe table in a document so each
|
|
523
|
+
* column's pipes line up visually, padding cells to the widest content in
|
|
524
|
+
* that column and rebuilding the delimiter row's dashes/colons to match,
|
|
525
|
+
* while preserving each column's declared alignment. Tables inside fenced
|
|
526
|
+
* code blocks are left untouched, matching how GitHub's own renderer treats
|
|
527
|
+
* them as literal text rather than a real table. A row with a different
|
|
528
|
+
* cell count than the header is padded or truncated to match, with a
|
|
529
|
+
* warning. Column width is measured in characters (not rendered pixel
|
|
530
|
+
* width), so tables with wide-character (e.g. CJK) content may not align
|
|
531
|
+
* pixel-perfectly even though the character counts match.
|
|
532
|
+
*/
|
|
533
|
+
declare function alignMarkdownTables(markdown: string): MarkdownTableAlignResult | {
|
|
534
|
+
error: string;
|
|
535
|
+
};
|
|
507
536
|
|
|
508
537
|
type data_CaptionSpeedCue = CaptionSpeedCue;
|
|
509
538
|
type data_CaptionSpeedResult = CaptionSpeedResult;
|
|
@@ -525,6 +554,9 @@ type data_EnvParseResult = EnvParseResult;
|
|
|
525
554
|
type data_FrontMatterError = FrontMatterError;
|
|
526
555
|
type data_FrontMatterResult = FrontMatterResult;
|
|
527
556
|
type data_IniSection = IniSection;
|
|
557
|
+
type data_MarkdownTableAlignResult = MarkdownTableAlignResult;
|
|
558
|
+
type data_MarkdownTableColumnAlignment = MarkdownTableColumnAlignment;
|
|
559
|
+
type data_MarkdownTableInfo = MarkdownTableInfo;
|
|
528
560
|
type data_MarkdownTaskListItem = MarkdownTaskListItem;
|
|
529
561
|
type data_MarkdownTaskListProgressResult = MarkdownTaskListProgressResult;
|
|
530
562
|
type data_MarkdownTaskListSectionSummary = MarkdownTaskListSectionSummary;
|
|
@@ -546,6 +578,7 @@ type data_XmlToJsonOptions = XmlToJsonOptions;
|
|
|
546
578
|
type data_YamlAnchorInfo = YamlAnchorInfo;
|
|
547
579
|
type data_YamlAnchorResolveError = YamlAnchorResolveError;
|
|
548
580
|
type data_YamlAnchorResolveResult = YamlAnchorResolveResult;
|
|
581
|
+
declare const data_alignMarkdownTables: typeof alignMarkdownTables;
|
|
549
582
|
declare const data_analyzeCaptionSpeed: typeof analyzeCaptionSpeed;
|
|
550
583
|
declare const data_calculateMarkdownTaskListProgress: typeof calculateMarkdownTaskListProgress;
|
|
551
584
|
declare const data_convertSubtitles: typeof convertSubtitles;
|
|
@@ -599,7 +632,7 @@ declare const data_validateXml: typeof validateXml;
|
|
|
599
632
|
declare const data_validateYaml: typeof validateYaml;
|
|
600
633
|
declare const data_xmlToJson: typeof xmlToJson;
|
|
601
634
|
declare namespace data {
|
|
602
|
-
export { type data_CaptionSpeedCue as CaptionSpeedCue, type data_CaptionSpeedResult as CaptionSpeedResult, type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvColumnType as CsvColumnType, type data_CsvColumnTypeInfo as CsvColumnTypeInfo, type data_CsvColumnTypeOptions as CsvColumnTypeOptions, type data_CsvColumnTypeResult as CsvColumnTypeResult, type data_CsvDuplicateGroup as CsvDuplicateGroup, type data_CsvDuplicateOptions as CsvDuplicateOptions, type data_CsvDuplicateResult as CsvDuplicateResult, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTaskListItem as MarkdownTaskListItem, type data_MarkdownTaskListProgressResult as MarkdownTaskListProgressResult, type data_MarkdownTaskListSectionSummary as MarkdownTaskListSectionSummary, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonDedupeResult as NdjsonDedupeResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, type data_YamlAnchorInfo as YamlAnchorInfo, type data_YamlAnchorResolveError as YamlAnchorResolveError, type data_YamlAnchorResolveResult as YamlAnchorResolveResult, data_analyzeCaptionSpeed as analyzeCaptionSpeed, data_calculateMarkdownTaskListProgress as calculateMarkdownTaskListProgress, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_dedupeNdjson as dedupeNdjson, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_findCsvDuplicateRows as findCsvDuplicateRows, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_inferCsvColumnTypes as inferCsvColumnTypes, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_resolveYamlAnchors as resolveYamlAnchors, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
635
|
+
export { type data_CaptionSpeedCue as CaptionSpeedCue, type data_CaptionSpeedResult as CaptionSpeedResult, type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvColumnType as CsvColumnType, type data_CsvColumnTypeInfo as CsvColumnTypeInfo, type data_CsvColumnTypeOptions as CsvColumnTypeOptions, type data_CsvColumnTypeResult as CsvColumnTypeResult, type data_CsvDuplicateGroup as CsvDuplicateGroup, type data_CsvDuplicateOptions as CsvDuplicateOptions, type data_CsvDuplicateResult as CsvDuplicateResult, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTableAlignResult as MarkdownTableAlignResult, type data_MarkdownTableColumnAlignment as MarkdownTableColumnAlignment, type data_MarkdownTableInfo as MarkdownTableInfo, type data_MarkdownTaskListItem as MarkdownTaskListItem, type data_MarkdownTaskListProgressResult as MarkdownTaskListProgressResult, type data_MarkdownTaskListSectionSummary as MarkdownTaskListSectionSummary, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonDedupeResult as NdjsonDedupeResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, type data_YamlAnchorInfo as YamlAnchorInfo, type data_YamlAnchorResolveError as YamlAnchorResolveError, type data_YamlAnchorResolveResult as YamlAnchorResolveResult, data_alignMarkdownTables as alignMarkdownTables, data_analyzeCaptionSpeed as analyzeCaptionSpeed, data_calculateMarkdownTaskListProgress as calculateMarkdownTaskListProgress, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_dedupeNdjson as dedupeNdjson, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_findCsvDuplicateRows as findCsvDuplicateRows, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_inferCsvColumnTypes as inferCsvColumnTypes, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_resolveYamlAnchors as resolveYamlAnchors, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
603
636
|
}
|
|
604
637
|
|
|
605
|
-
export {
|
|
638
|
+
export { detectSubtitleFormat as $, type NdjsonValidateResult as A, type ParsedIni as B, type CaptionSpeedCue as C, type ParsedSubtitles as D, type EnvDiffError as E, type FrontMatterError as F, type SubtitleFormat as G, type XmlToJsonOptions as H, type IniSection as I, type YamlAnchorResolveError as J, type YamlAnchorResolveResult as K, alignMarkdownTables as L, type MarkdownTableAlignResult as M, type NdjsonDedupeResult as N, analyzeCaptionSpeed as O, type ParseOptions as P, calculateMarkdownTaskListProgress as Q, convertSubtitles as R, type SubtitleCue as S, type TomlFormatResult as T, csvToJson as U, type ValidationResult as V, csvToSqlInsert as W, type XmlFormatResult as X, type YamlAnchorInfo as Y, dedupeNdjson as Z, detectDelimiter as _, type CaptionSpeedResult as a, diffEnvExample as a0, envToExport as a1, envToJson as a2, findCsvDuplicateRows as a3, formatNdjson as a4, formatSubtitleTimestamp as a5, formatToml as a6, formatXml as a7, generateMarkdownToc as a8, getSection as a9, tomlToJson as aA, validateEnvKey as aB, validateIni as aC, validateNdjson as aD, validateToml as aE, validateXml as aF, validateYaml as aG, xmlToJson as aH, getSectionNames as aa, getTomlStats as ab, getXmlStats as ac, getYamlStats as ad, inferCsvColumnTypes as ae, iniToJson as af, jsonArrayToNdjson as ag, jsonToIni as ah, jsonToToml as ai, jsonToXml as aj, minifyNdjson as ak, minifyToml as al, minifyXml as am, ndjsonToJsonArray as an, parseCsv as ao, parseEnv as ap, parseFrontMatter as aq, parseIni as ar, parseSubtitleTimestamp as as, parseSubtitles as at, parseXmlToObject as au, resolveYamlAnchors as av, serializeSubtitles as aw, shiftSubtitles as ax, stringifyIni as ay, toCsvString as az, type ConvertedSubtitles as b, type CsvColumnType as c, data as d, type CsvColumnTypeInfo as e, type CsvColumnTypeOptions as f, type CsvColumnTypeResult as g, type CsvDuplicateGroup as h, type CsvDuplicateOptions as i, type CsvDuplicateResult as j, type CsvParseResult as k, type CsvToSqlOptions as l, type CsvToSqlResult as m, type EnvDiffResult as n, type EnvEntry as o, type EnvParseResult as p, type FrontMatterResult as q, type MarkdownTableColumnAlignment as r, type MarkdownTableInfo as s, type MarkdownTaskListItem as t, type MarkdownTaskListProgressResult as u, type MarkdownTaskListSectionSummary as v, type MarkdownTocEntry as w, type MarkdownTocOptions as x, type MarkdownTocResult as y, type NdjsonLineResult as z };
|