@utilix-tech/sdk 0.40.0 → 0.42.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 +7 -0
- package/README.md +24 -3
- package/dist/{chunk-RZUNTYEH.js → chunk-JR354NH4.js} +61 -1
- package/dist/{chunk-Y4BVU76A.js → chunk-UD45LBG7.js} +156 -1
- package/dist/{data-BCf3dm-E.d.cts → data-BKpEOcOX.d.cts} +35 -2
- package/dist/{data-BCf3dm-E.d.ts → data-BKpEOcOX.d.ts} +35 -2
- package/dist/index.cjs +215 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{network-CKPoesdD.d.ts → network-oAs83Ztn.d.cts} +91 -2
- package/dist/{network-CKPoesdD.d.cts → network-oAs83Ztn.d.ts} +91 -2
- package/dist/tools/data.cjs +60 -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 +155 -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/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Full release notes for all Utilix surfaces (browser tools, REST API, SDKs, MCP server) live at [utilix.tech/changelog](https://utilix.tech/changelog). This file tracks just this package.
|
|
4
4
|
|
|
5
|
+
## 0.42.0
|
|
6
|
+
- Add `buildVaryHeader`, `parseVaryHeader` (vary-header-builder): build a `Vary` response header from request-header names with a plain-English caching note per header, or parse an existing Vary header into the same shape.
|
|
7
|
+
|
|
8
|
+
## 0.41.0
|
|
9
|
+
- Add `buildRangeHeader`, `parseContentRangeHeader` (http-range-header-builder): build an HTTP `Range` request header from explicit, open-ended, or suffix ("last N bytes") byte ranges, and parse a server's `Content-Range` response to verify what it actually sent back.
|
|
10
|
+
- Add `findCsvDuplicateRows` (csv-duplicate-row-finder): group CSV/TSV rows that share the same value across a chosen set of key columns, or the entire row, and report each duplicate group's occurrence count and data row numbers.
|
|
11
|
+
|
|
5
12
|
## 0.40.0
|
|
6
13
|
- Add `calculateCashBreakdown`, `calculateChange` (cash-till-calculator): break a cash amount down into the minimum count of bills/coins from a set of denominations (largest first), or compute change owed for a payment/tender pair and its breakdown.
|
|
7
14
|
- Add `generateEtag` (etag-generator): compute a content-hash ETag (MD5/SHA-1/SHA-256) for a response header, with an optional weak-validator (W/) prefix.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @utilix-tech/sdk
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**620 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)
|
|
@@ -201,7 +201,7 @@ import { parseCsv, csvToJson, validateYaml, tomlToJson, jsonToToml,
|
|
|
201
201
|
formatXml, xmlToJson, jsonToXml, parseIni,
|
|
202
202
|
validateNdjson, formatNdjson, ndjsonToJsonArray, diffEnvExample,
|
|
203
203
|
parseSubtitles, convertSubtitles, shiftSubtitles, parseFrontMatter,
|
|
204
|
-
generateMarkdownToc, csvToSqlInsert } from "@utilix-tech/sdk/data";
|
|
204
|
+
generateMarkdownToc, csvToSqlInsert, findCsvDuplicateRows } from "@utilix-tech/sdk/data";
|
|
205
205
|
|
|
206
206
|
// CSV
|
|
207
207
|
const rows = parseCsv("name,age\nalice,30\nbob,25");
|
|
@@ -247,6 +247,10 @@ generateMarkdownToc("# Title\n\n## Section One\n\n## Section Two\n");
|
|
|
247
247
|
// CSV to SQL INSERT statements, with basic type inference and identifier quoting
|
|
248
248
|
csvToSqlInsert("name,age\nAlice,30\nBob,25", { tableName: "users" });
|
|
249
249
|
// { sql: 'INSERT INTO "users" ("name", "age") VALUES (\'Alice\', 30);\n...', rowCount: 2, ... }
|
|
250
|
+
|
|
251
|
+
// Find duplicate rows in CSV/TSV data, by the whole row or a chosen key column set
|
|
252
|
+
findCsvDuplicateRows("name,email\nAlice,a@x.com\nBob,b@x.com\nAlice,a@x.com");
|
|
253
|
+
// { duplicateGroups: [{ key: ["Alice", "a@x.com"], rowNumbers: [1, 3], count: 2 }], duplicateRowCount: 2, ... }
|
|
250
254
|
```
|
|
251
255
|
|
|
252
256
|
---
|
|
@@ -428,7 +432,8 @@ calculateChange(4.65, 5.0, USD_DENOMINATIONS);
|
|
|
428
432
|
import { getStatusCode, isValidIp, isValidIpv4, isValidIpv6,
|
|
429
433
|
searchStatusCodes, buildGeoUrl, countryCodeToFlag,
|
|
430
434
|
parseHar, validateSitemap, validateRobotsTxt,
|
|
431
|
-
parseUserAgent, buildCacheControl, buildReferrerPolicy, parseIpv6Address, buildLinkHeader, checkSetCookieHeader, analyzeEmailHeaders
|
|
435
|
+
parseUserAgent, buildCacheControl, buildReferrerPolicy, parseIpv6Address, buildLinkHeader, checkSetCookieHeader, analyzeEmailHeaders,
|
|
436
|
+
buildRangeHeader, parseContentRangeHeader, buildVaryHeader, parseVaryHeader } from "@utilix-tech/sdk/network";
|
|
432
437
|
|
|
433
438
|
getStatusCode(404);
|
|
434
439
|
// { code: 404, text: "Not Found", description: "...", category: "Client Error" }
|
|
@@ -483,6 +488,22 @@ checkSetCookieHeader("session=abc123; SameSite=None");
|
|
|
483
488
|
// Parse a raw email header block: fields, Received hop chain, SPF/DKIM/DMARC results
|
|
484
489
|
analyzeEmailHeaders(rawHeaderText);
|
|
485
490
|
// { from: "...", to: "...", receivedHops: [...], hopCount: 2, spf: "pass", dkim: "pass", dmarc: "pass", warnings: [] }
|
|
491
|
+
|
|
492
|
+
// Build a Range request header from explicit, open-ended, or suffix ("last N bytes") byte ranges
|
|
493
|
+
buildRangeHeader([{ start: 0, end: 1023 }], { totalSize: 146515 });
|
|
494
|
+
// { header: "Range: bytes=0-1023", ranges: [...], totalBytesRequested: 1024, warnings: [] }
|
|
495
|
+
|
|
496
|
+
// Parse a Content-Range response header to verify what a server actually sent back
|
|
497
|
+
parseContentRangeHeader("bytes 200-1000/67589");
|
|
498
|
+
// { unit: "bytes", start: 200, end: 1000, total: 67589, byteLength: 801, isUnsatisfiable: false }
|
|
499
|
+
|
|
500
|
+
// Build a Vary response header from request-header names, with a plain-English caching note per header
|
|
501
|
+
buildVaryHeader(["Accept-Encoding", "Accept-Language"]);
|
|
502
|
+
// { header: "Vary: Accept-Encoding, Accept-Language", entries: [...], warnings: [] }
|
|
503
|
+
|
|
504
|
+
// Parse an existing Vary header value into the same shape
|
|
505
|
+
parseVaryHeader("Vary: Accept-Encoding, Accept-Language");
|
|
506
|
+
// { header: "Vary: Accept-Encoding, Accept-Language", entries: [...], warnings: [] }
|
|
486
507
|
```
|
|
487
508
|
|
|
488
509
|
---
|
|
@@ -13,6 +13,7 @@ __export(data_exports, {
|
|
|
13
13
|
diffEnvExample: () => diffEnvExample,
|
|
14
14
|
envToExport: () => envToExport,
|
|
15
15
|
envToJson: () => envToJson,
|
|
16
|
+
findCsvDuplicateRows: () => findCsvDuplicateRows,
|
|
16
17
|
formatNdjson: () => formatNdjson,
|
|
17
18
|
formatSubtitleTimestamp: () => formatSubtitleTimestamp,
|
|
18
19
|
formatToml: () => formatToml,
|
|
@@ -1500,5 +1501,64 @@ function csvToSqlInsert(input, options) {
|
|
|
1500
1501
|
columns
|
|
1501
1502
|
};
|
|
1502
1503
|
}
|
|
1504
|
+
function _normalizeDuplicateValue(value, caseSensitive, trimWhitespace) {
|
|
1505
|
+
let v = value;
|
|
1506
|
+
if (trimWhitespace) v = v.trim();
|
|
1507
|
+
if (!caseSensitive) v = v.toLowerCase();
|
|
1508
|
+
return v;
|
|
1509
|
+
}
|
|
1510
|
+
function findCsvDuplicateRows(input, options) {
|
|
1511
|
+
const parsed = parseCsv(input, {
|
|
1512
|
+
delimiter: options?.delimiter ?? ",",
|
|
1513
|
+
hasHeader: options?.hasHeader !== false,
|
|
1514
|
+
trimWhitespace: false
|
|
1515
|
+
});
|
|
1516
|
+
if ("error" in parsed) return parsed;
|
|
1517
|
+
if (parsed.rows.length === 0) return { error: "No data rows found" };
|
|
1518
|
+
const caseSensitive = options?.caseSensitive !== false;
|
|
1519
|
+
const trimWhitespace = options?.trimWhitespace !== false;
|
|
1520
|
+
let keyIndexes;
|
|
1521
|
+
if (options?.keyColumns && options.keyColumns.length > 0) {
|
|
1522
|
+
keyIndexes = [];
|
|
1523
|
+
for (const col of options.keyColumns) {
|
|
1524
|
+
const idx = parsed.headers.indexOf(col);
|
|
1525
|
+
if (idx === -1) {
|
|
1526
|
+
return { error: `Column "${col}" not found. Available columns: ${parsed.headers.join(", ")}` };
|
|
1527
|
+
}
|
|
1528
|
+
keyIndexes.push(idx);
|
|
1529
|
+
}
|
|
1530
|
+
} else {
|
|
1531
|
+
keyIndexes = parsed.headers.map((_, idx) => idx);
|
|
1532
|
+
}
|
|
1533
|
+
const groups = /* @__PURE__ */ new Map();
|
|
1534
|
+
parsed.rows.forEach((row, i) => {
|
|
1535
|
+
const key = keyIndexes.map((idx) => row[idx] ?? "");
|
|
1536
|
+
const normalizedKey = keyIndexes.map((idx) => _normalizeDuplicateValue(row[idx] ?? "", caseSensitive, trimWhitespace));
|
|
1537
|
+
const mapKey = JSON.stringify(normalizedKey);
|
|
1538
|
+
const rowNumber = i + 1;
|
|
1539
|
+
const existing = groups.get(mapKey);
|
|
1540
|
+
if (existing) {
|
|
1541
|
+
existing.rowNumbers.push(rowNumber);
|
|
1542
|
+
} else {
|
|
1543
|
+
groups.set(mapKey, { key, rowNumbers: [rowNumber] });
|
|
1544
|
+
}
|
|
1545
|
+
});
|
|
1546
|
+
const duplicateGroups = [];
|
|
1547
|
+
let duplicateRowCount = 0;
|
|
1548
|
+
for (const group of groups.values()) {
|
|
1549
|
+
if (group.rowNumbers.length > 1) {
|
|
1550
|
+
duplicateGroups.push({ key: group.key, rowNumbers: group.rowNumbers, count: group.rowNumbers.length });
|
|
1551
|
+
duplicateRowCount += group.rowNumbers.length;
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
duplicateGroups.sort((a, b) => b.count - a.count);
|
|
1555
|
+
return {
|
|
1556
|
+
headers: parsed.headers,
|
|
1557
|
+
totalRows: parsed.rows.length,
|
|
1558
|
+
duplicateGroups,
|
|
1559
|
+
duplicateRowCount,
|
|
1560
|
+
uniqueRowCount: parsed.rows.length - duplicateRowCount + duplicateGroups.length
|
|
1561
|
+
};
|
|
1562
|
+
}
|
|
1503
1563
|
|
|
1504
|
-
export { convertSubtitles, csvToJson, csvToSqlInsert, data_exports, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson };
|
|
1564
|
+
export { convertSubtitles, csvToJson, csvToSqlInsert, data_exports, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, findCsvDuplicateRows, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson };
|
|
@@ -14,7 +14,9 @@ __export(network_exports, {
|
|
|
14
14
|
buildGeoUrl: () => buildGeoUrl,
|
|
15
15
|
buildLinkHeader: () => buildLinkHeader,
|
|
16
16
|
buildMapUrl: () => buildMapUrl,
|
|
17
|
+
buildRangeHeader: () => buildRangeHeader,
|
|
17
18
|
buildReferrerPolicy: () => buildReferrerPolicy,
|
|
19
|
+
buildVaryHeader: () => buildVaryHeader,
|
|
18
20
|
checkSetCookieHeader: () => checkSetCookieHeader,
|
|
19
21
|
countryCodeToFlag: () => countryCodeToFlag,
|
|
20
22
|
formatCoordinates: () => formatCoordinates,
|
|
@@ -30,11 +32,13 @@ __export(network_exports, {
|
|
|
30
32
|
isValidIp: () => isValidIp,
|
|
31
33
|
isValidIpv4: () => isValidIpv4,
|
|
32
34
|
isValidIpv6: () => isValidIpv6,
|
|
35
|
+
parseContentRangeHeader: () => parseContentRangeHeader,
|
|
33
36
|
parseDnsResponse: () => parseDnsResponse,
|
|
34
37
|
parseGeoResponse: () => parseGeoResponse,
|
|
35
38
|
parseHar: () => parseHar,
|
|
36
39
|
parseIpv6Address: () => parseIpv6Address,
|
|
37
40
|
parseUserAgent: () => parseUserAgent,
|
|
41
|
+
parseVaryHeader: () => parseVaryHeader,
|
|
38
42
|
searchHeaders: () => searchHeaders,
|
|
39
43
|
searchStatusCodes: () => searchStatusCodes,
|
|
40
44
|
statusCodeToText: () => statusCodeToText,
|
|
@@ -2209,5 +2213,156 @@ function analyzeEmailHeaders(raw) {
|
|
|
2209
2213
|
warnings
|
|
2210
2214
|
};
|
|
2211
2215
|
}
|
|
2216
|
+
function _round2(n) {
|
|
2217
|
+
return Math.round(n * 100) / 100;
|
|
2218
|
+
}
|
|
2219
|
+
function buildRangeHeader(entries, options) {
|
|
2220
|
+
if (!Array.isArray(entries) || entries.length === 0) {
|
|
2221
|
+
return { error: "At least one range is required" };
|
|
2222
|
+
}
|
|
2223
|
+
const unit = options?.unit?.trim() || "bytes";
|
|
2224
|
+
const totalSize = typeof options?.totalSize === "number" && Number.isFinite(options.totalSize) ? options.totalSize : void 0;
|
|
2225
|
+
if (totalSize !== void 0 && totalSize <= 0) {
|
|
2226
|
+
return { error: "totalSize must be a positive number when provided" };
|
|
2227
|
+
}
|
|
2228
|
+
const parsed = [];
|
|
2229
|
+
for (const entry of entries) {
|
|
2230
|
+
if (entry.suffixLength !== void 0) {
|
|
2231
|
+
if (!Number.isFinite(entry.suffixLength) || entry.suffixLength <= 0) {
|
|
2232
|
+
return { error: "suffixLength must be a positive number" };
|
|
2233
|
+
}
|
|
2234
|
+
const suffixLength = Math.floor(entry.suffixLength);
|
|
2235
|
+
const byteLength = totalSize !== void 0 ? Math.min(suffixLength, totalSize) : suffixLength;
|
|
2236
|
+
parsed.push({
|
|
2237
|
+
spec: `-${suffixLength}`,
|
|
2238
|
+
start: null,
|
|
2239
|
+
end: null,
|
|
2240
|
+
suffixLength,
|
|
2241
|
+
byteLength,
|
|
2242
|
+
percentOfTotal: totalSize !== void 0 ? _round2(byteLength / totalSize * 100) : null
|
|
2243
|
+
});
|
|
2244
|
+
continue;
|
|
2245
|
+
}
|
|
2246
|
+
if (entry.start === void 0) {
|
|
2247
|
+
return { error: "Each range requires either a start byte or a suffixLength" };
|
|
2248
|
+
}
|
|
2249
|
+
if (!Number.isFinite(entry.start) || entry.start < 0) {
|
|
2250
|
+
return { error: "start must be a non-negative number" };
|
|
2251
|
+
}
|
|
2252
|
+
const start = Math.floor(entry.start);
|
|
2253
|
+
if (totalSize !== void 0 && start >= totalSize) {
|
|
2254
|
+
return { error: `start byte ${start} is beyond totalSize (${totalSize})` };
|
|
2255
|
+
}
|
|
2256
|
+
if (entry.end !== void 0) {
|
|
2257
|
+
if (!Number.isFinite(entry.end) || entry.end < 0) {
|
|
2258
|
+
return { error: "end must be a non-negative number" };
|
|
2259
|
+
}
|
|
2260
|
+
const end = Math.floor(entry.end);
|
|
2261
|
+
if (end < start) {
|
|
2262
|
+
return { error: `range end (${end}) must be >= start (${start})` };
|
|
2263
|
+
}
|
|
2264
|
+
if (totalSize !== void 0 && end >= totalSize) {
|
|
2265
|
+
return { error: `end byte ${end} is beyond totalSize (${totalSize})` };
|
|
2266
|
+
}
|
|
2267
|
+
const byteLength = end - start + 1;
|
|
2268
|
+
parsed.push({
|
|
2269
|
+
spec: `${start}-${end}`,
|
|
2270
|
+
start,
|
|
2271
|
+
end,
|
|
2272
|
+
suffixLength: null,
|
|
2273
|
+
byteLength,
|
|
2274
|
+
percentOfTotal: totalSize !== void 0 ? _round2(byteLength / totalSize * 100) : null
|
|
2275
|
+
});
|
|
2276
|
+
} else {
|
|
2277
|
+
const byteLength = totalSize !== void 0 ? totalSize - start : null;
|
|
2278
|
+
parsed.push({
|
|
2279
|
+
spec: `${start}-`,
|
|
2280
|
+
start,
|
|
2281
|
+
end: null,
|
|
2282
|
+
suffixLength: null,
|
|
2283
|
+
byteLength,
|
|
2284
|
+
percentOfTotal: byteLength !== null && totalSize !== void 0 ? _round2(byteLength / totalSize * 100) : null
|
|
2285
|
+
});
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
const warnings = [];
|
|
2289
|
+
const resolvable = parsed.map((r, i) => ({ i, start: r.start ?? (totalSize !== void 0 && r.suffixLength !== null ? totalSize - Math.min(r.suffixLength, totalSize) : null), end: r.end ?? (totalSize !== void 0 ? totalSize - 1 : null) })).filter((r) => r.start !== null && r.end !== null).sort((a, b) => a.start - b.start);
|
|
2290
|
+
for (let i = 1; i < resolvable.length; i++) {
|
|
2291
|
+
if (resolvable[i].start <= resolvable[i - 1].end) {
|
|
2292
|
+
warnings.push(`ranges "${parsed[resolvable[i - 1].i].spec}" and "${parsed[resolvable[i].i].spec}" overlap - servers may reject overlapping multi-range requests`);
|
|
2293
|
+
}
|
|
2294
|
+
}
|
|
2295
|
+
if (parsed.length > 1 && parsed.some((r) => r.byteLength === null)) {
|
|
2296
|
+
warnings.push("totalSize was not provided, so open-ended ranges cannot be checked for overlap or total byte count");
|
|
2297
|
+
}
|
|
2298
|
+
const totalBytesRequested = parsed.every((r) => r.byteLength !== null) ? parsed.reduce((sum, r) => sum + (r.byteLength ?? 0), 0) : null;
|
|
2299
|
+
const headerValue = `${unit}=${parsed.map((r) => r.spec).join(",")}`;
|
|
2300
|
+
return {
|
|
2301
|
+
header: `Range: ${headerValue}`,
|
|
2302
|
+
headerValue,
|
|
2303
|
+
ranges: parsed,
|
|
2304
|
+
totalBytesRequested,
|
|
2305
|
+
warnings
|
|
2306
|
+
};
|
|
2307
|
+
}
|
|
2308
|
+
function parseContentRangeHeader(header) {
|
|
2309
|
+
if (!header || header.trim() === "") return { error: "Input is empty" };
|
|
2310
|
+
const match = header.trim().match(/^(\S+)\s+(\*|\d+-\d+)\/(\*|\d+)$/);
|
|
2311
|
+
if (!match) {
|
|
2312
|
+
return { error: 'Could not parse Content-Range header. Expected a format like "bytes 200-1000/67589" or "bytes */67589"' };
|
|
2313
|
+
}
|
|
2314
|
+
const [, unit, range, totalRaw] = match;
|
|
2315
|
+
const isUnsatisfiable = range === "*";
|
|
2316
|
+
const isTotalUnknown = totalRaw === "*";
|
|
2317
|
+
const total = isTotalUnknown ? null : Number(totalRaw);
|
|
2318
|
+
if (isUnsatisfiable) {
|
|
2319
|
+
return { unit, start: null, end: null, total, isUnsatisfiable, isTotalUnknown, byteLength: null };
|
|
2320
|
+
}
|
|
2321
|
+
const [startRaw, endRaw] = range.split("-");
|
|
2322
|
+
const start = Number(startRaw);
|
|
2323
|
+
const end = Number(endRaw);
|
|
2324
|
+
if (end < start) {
|
|
2325
|
+
return { error: `Invalid range: end (${end}) is before start (${start})` };
|
|
2326
|
+
}
|
|
2327
|
+
return { unit, start, end, total, isUnsatisfiable, isTotalUnknown, byteLength: end - start + 1 };
|
|
2328
|
+
}
|
|
2329
|
+
var VARY_HEADER_NOTES = {
|
|
2330
|
+
"accept-encoding": "Caches must store a separate response per compression scheme (gzip, br, etc.) the client accepts.",
|
|
2331
|
+
"accept-language": "Caches must store a separate response per requested language, which can fragment a shared cache badly if Accept-Language values are highly varied.",
|
|
2332
|
+
"accept": "Caches must store a separate response per requested content type (e.g. JSON vs HTML).",
|
|
2333
|
+
"user-agent": "Caches must store a separate response per distinct User-Agent string, which is often unique enough to make caching nearly ineffective.",
|
|
2334
|
+
"authorization": "Signals the response is user-specific; most shared caches will refuse to cache it at all rather than key on this header.",
|
|
2335
|
+
"cookie": "Same effect as Authorization: shared caches typically treat the response as private and skip caching rather than key on cookie values.",
|
|
2336
|
+
"origin": "Caches must store a separate response per requesting Origin, needed whenever a response includes CORS headers that differ by origin.",
|
|
2337
|
+
"x-requested-with": "Caches must store a separate response depending on whether the request was made via an XHR/fetch client hint.",
|
|
2338
|
+
"x-forwarded-proto": "Caches must store a separate response for HTTP vs HTTPS requests, relevant behind a proxy or load balancer that terminates TLS."
|
|
2339
|
+
};
|
|
2340
|
+
function buildVaryHeader(headers) {
|
|
2341
|
+
if (!Array.isArray(headers) || headers.length === 0) return { error: "At least one header is required" };
|
|
2342
|
+
const trimmed = headers.map((h) => typeof h === "string" ? h.trim() : "").filter((h) => h.length > 0);
|
|
2343
|
+
if (trimmed.length === 0) return { error: "At least one header is required" };
|
|
2344
|
+
const warnings = [];
|
|
2345
|
+
if (trimmed.some((h) => h === "*") && trimmed.length > 1) {
|
|
2346
|
+
warnings.push('"*" makes every request effectively uncacheable; combining it with other header names is redundant, most caches will just skip caching entirely');
|
|
2347
|
+
}
|
|
2348
|
+
const seen = /* @__PURE__ */ new Map();
|
|
2349
|
+
for (const h of trimmed) {
|
|
2350
|
+
const key = h.toLowerCase();
|
|
2351
|
+
if (!seen.has(key)) seen.set(key, h);
|
|
2352
|
+
}
|
|
2353
|
+
if (seen.size < trimmed.length) warnings.push("duplicate header names were removed");
|
|
2354
|
+
const entries = Array.from(seen.values()).map((h) => ({
|
|
2355
|
+
header: h,
|
|
2356
|
+
note: h === "*" ? "Every response is considered unique; most caches will not store it at all." : VARY_HEADER_NOTES[h.toLowerCase()] ?? `Caches must store a separate response per distinct ${h} value.`
|
|
2357
|
+
}));
|
|
2358
|
+
const headerValue = entries.map((e) => e.header).join(", ");
|
|
2359
|
+
return { header: `Vary: ${headerValue}`, headerValue, entries, warnings };
|
|
2360
|
+
}
|
|
2361
|
+
function parseVaryHeader(raw) {
|
|
2362
|
+
if (!raw || raw.trim() === "") return { error: "Input is empty" };
|
|
2363
|
+
const withoutLabel = raw.trim().replace(/^vary:\s*/i, "");
|
|
2364
|
+
const headers = withoutLabel.split(",").map((h) => h.trim()).filter((h) => h.length > 0);
|
|
2365
|
+
return buildVaryHeader(headers);
|
|
2366
|
+
}
|
|
2212
2367
|
|
|
2213
|
-
export { DNS_RECORD_TYPES, HTTP_HEADERS, LINK_REL_VALUES, REFERRER_POLICY_VALUES, STATUS_CODES, analyzeEmailHeaders, buildCacheControl, buildDnsQueryUrl, buildGeoUrl, buildLinkHeader, buildMapUrl, buildReferrerPolicy, checkSetCookieHeader, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, network_exports, parseDnsResponse, parseGeoResponse, parseHar, parseIpv6Address, parseUserAgent, searchHeaders, searchStatusCodes, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateRobotsTxt, validateSitemap };
|
|
2368
|
+
export { DNS_RECORD_TYPES, HTTP_HEADERS, LINK_REL_VALUES, REFERRER_POLICY_VALUES, STATUS_CODES, analyzeEmailHeaders, buildCacheControl, buildDnsQueryUrl, buildGeoUrl, buildLinkHeader, buildMapUrl, buildRangeHeader, buildReferrerPolicy, buildVaryHeader, checkSetCookieHeader, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, network_exports, parseContentRangeHeader, parseDnsResponse, parseGeoResponse, parseHar, parseIpv6Address, parseUserAgent, parseVaryHeader, searchHeaders, searchStatusCodes, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateRobotsTxt, validateSitemap };
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* - markdown-front-matter-parser: parseFrontMatter
|
|
17
17
|
* - markdown-toc-generator: generateMarkdownToc
|
|
18
18
|
* - csv-to-sql-insert-generator: csvToSqlInsert
|
|
19
|
+
* - csv-duplicate-row-finder: findCsvDuplicateRows
|
|
19
20
|
*/
|
|
20
21
|
interface ValidationResult {
|
|
21
22
|
valid: boolean;
|
|
@@ -343,8 +344,39 @@ interface CsvToSqlResult {
|
|
|
343
344
|
declare function csvToSqlInsert(input: string, options?: CsvToSqlOptions): CsvToSqlResult | {
|
|
344
345
|
error: string;
|
|
345
346
|
};
|
|
347
|
+
interface CsvDuplicateOptions {
|
|
348
|
+
delimiter?: string;
|
|
349
|
+
hasHeader?: boolean;
|
|
350
|
+
keyColumns?: string[];
|
|
351
|
+
caseSensitive?: boolean;
|
|
352
|
+
trimWhitespace?: boolean;
|
|
353
|
+
}
|
|
354
|
+
interface CsvDuplicateGroup {
|
|
355
|
+
key: string[];
|
|
356
|
+
rowNumbers: number[];
|
|
357
|
+
count: number;
|
|
358
|
+
}
|
|
359
|
+
interface CsvDuplicateResult {
|
|
360
|
+
headers: string[];
|
|
361
|
+
totalRows: number;
|
|
362
|
+
duplicateGroups: CsvDuplicateGroup[];
|
|
363
|
+
duplicateRowCount: number;
|
|
364
|
+
uniqueRowCount: number;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Parse CSV/TSV data and group rows that share the same value across a
|
|
368
|
+
* chosen set of key columns (or the entire row, if no key columns are
|
|
369
|
+
* given), so you can spot and clean up accidental duplicates before an
|
|
370
|
+
* import.
|
|
371
|
+
*/
|
|
372
|
+
declare function findCsvDuplicateRows(input: string, options?: CsvDuplicateOptions): CsvDuplicateResult | {
|
|
373
|
+
error: string;
|
|
374
|
+
};
|
|
346
375
|
|
|
347
376
|
type data_ConvertedSubtitles = ConvertedSubtitles;
|
|
377
|
+
type data_CsvDuplicateGroup = CsvDuplicateGroup;
|
|
378
|
+
type data_CsvDuplicateOptions = CsvDuplicateOptions;
|
|
379
|
+
type data_CsvDuplicateResult = CsvDuplicateResult;
|
|
348
380
|
type data_CsvParseResult = CsvParseResult;
|
|
349
381
|
type data_CsvToSqlOptions = CsvToSqlOptions;
|
|
350
382
|
type data_CsvToSqlResult = CsvToSqlResult;
|
|
@@ -377,6 +409,7 @@ declare const data_detectSubtitleFormat: typeof detectSubtitleFormat;
|
|
|
377
409
|
declare const data_diffEnvExample: typeof diffEnvExample;
|
|
378
410
|
declare const data_envToExport: typeof envToExport;
|
|
379
411
|
declare const data_envToJson: typeof envToJson;
|
|
412
|
+
declare const data_findCsvDuplicateRows: typeof findCsvDuplicateRows;
|
|
380
413
|
declare const data_formatNdjson: typeof formatNdjson;
|
|
381
414
|
declare const data_formatSubtitleTimestamp: typeof formatSubtitleTimestamp;
|
|
382
415
|
declare const data_formatToml: typeof formatToml;
|
|
@@ -416,7 +449,7 @@ declare const data_validateXml: typeof validateXml;
|
|
|
416
449
|
declare const data_validateYaml: typeof validateYaml;
|
|
417
450
|
declare const data_xmlToJson: typeof xmlToJson;
|
|
418
451
|
declare namespace data {
|
|
419
|
-
export { type data_ConvertedSubtitles as ConvertedSubtitles, 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_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, 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, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, 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_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_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 };
|
|
452
|
+
export { type data_ConvertedSubtitles as ConvertedSubtitles, 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_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, 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, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, 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_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_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 };
|
|
420
453
|
}
|
|
421
454
|
|
|
422
|
-
export {
|
|
455
|
+
export { minifyNdjson as $, findCsvDuplicateRows as A, formatNdjson as B, type ConvertedSubtitles as C, formatSubtitleTimestamp as D, type EnvDiffError as E, type FrontMatterError as F, formatToml as G, formatXml as H, type IniSection as I, generateMarkdownToc as J, getSection as K, getSectionNames as L, type MarkdownTocEntry as M, type NdjsonLineResult as N, getTomlStats as O, type ParseOptions as P, getXmlStats as Q, getYamlStats as R, type SubtitleCue as S, type TomlFormatResult as T, iniToJson as U, type ValidationResult as V, jsonArrayToNdjson as W, type XmlFormatResult as X, jsonToIni as Y, jsonToToml as Z, jsonToXml as _, type CsvDuplicateGroup as a, minifyToml as a0, minifyXml as a1, ndjsonToJsonArray as a2, parseCsv as a3, parseEnv as a4, parseFrontMatter as a5, parseIni as a6, parseSubtitleTimestamp as a7, parseSubtitles as a8, parseXmlToObject as a9, serializeSubtitles as aa, shiftSubtitles as ab, stringifyIni as ac, toCsvString as ad, tomlToJson as ae, validateEnvKey as af, validateIni as ag, validateNdjson as ah, validateToml as ai, validateXml as aj, validateYaml as ak, xmlToJson as al, type CsvDuplicateOptions as b, type CsvDuplicateResult as c, data as d, type CsvParseResult as e, type CsvToSqlOptions as f, type CsvToSqlResult as g, type EnvDiffResult as h, type EnvEntry as i, type EnvParseResult as j, type FrontMatterResult as k, type MarkdownTocOptions as l, type MarkdownTocResult as m, type NdjsonValidateResult as n, type ParsedIni as o, type ParsedSubtitles as p, type SubtitleFormat as q, type XmlToJsonOptions as r, convertSubtitles as s, csvToJson as t, csvToSqlInsert as u, detectDelimiter as v, detectSubtitleFormat as w, diffEnvExample as x, envToExport as y, envToJson as z };
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* - markdown-front-matter-parser: parseFrontMatter
|
|
17
17
|
* - markdown-toc-generator: generateMarkdownToc
|
|
18
18
|
* - csv-to-sql-insert-generator: csvToSqlInsert
|
|
19
|
+
* - csv-duplicate-row-finder: findCsvDuplicateRows
|
|
19
20
|
*/
|
|
20
21
|
interface ValidationResult {
|
|
21
22
|
valid: boolean;
|
|
@@ -343,8 +344,39 @@ interface CsvToSqlResult {
|
|
|
343
344
|
declare function csvToSqlInsert(input: string, options?: CsvToSqlOptions): CsvToSqlResult | {
|
|
344
345
|
error: string;
|
|
345
346
|
};
|
|
347
|
+
interface CsvDuplicateOptions {
|
|
348
|
+
delimiter?: string;
|
|
349
|
+
hasHeader?: boolean;
|
|
350
|
+
keyColumns?: string[];
|
|
351
|
+
caseSensitive?: boolean;
|
|
352
|
+
trimWhitespace?: boolean;
|
|
353
|
+
}
|
|
354
|
+
interface CsvDuplicateGroup {
|
|
355
|
+
key: string[];
|
|
356
|
+
rowNumbers: number[];
|
|
357
|
+
count: number;
|
|
358
|
+
}
|
|
359
|
+
interface CsvDuplicateResult {
|
|
360
|
+
headers: string[];
|
|
361
|
+
totalRows: number;
|
|
362
|
+
duplicateGroups: CsvDuplicateGroup[];
|
|
363
|
+
duplicateRowCount: number;
|
|
364
|
+
uniqueRowCount: number;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Parse CSV/TSV data and group rows that share the same value across a
|
|
368
|
+
* chosen set of key columns (or the entire row, if no key columns are
|
|
369
|
+
* given), so you can spot and clean up accidental duplicates before an
|
|
370
|
+
* import.
|
|
371
|
+
*/
|
|
372
|
+
declare function findCsvDuplicateRows(input: string, options?: CsvDuplicateOptions): CsvDuplicateResult | {
|
|
373
|
+
error: string;
|
|
374
|
+
};
|
|
346
375
|
|
|
347
376
|
type data_ConvertedSubtitles = ConvertedSubtitles;
|
|
377
|
+
type data_CsvDuplicateGroup = CsvDuplicateGroup;
|
|
378
|
+
type data_CsvDuplicateOptions = CsvDuplicateOptions;
|
|
379
|
+
type data_CsvDuplicateResult = CsvDuplicateResult;
|
|
348
380
|
type data_CsvParseResult = CsvParseResult;
|
|
349
381
|
type data_CsvToSqlOptions = CsvToSqlOptions;
|
|
350
382
|
type data_CsvToSqlResult = CsvToSqlResult;
|
|
@@ -377,6 +409,7 @@ declare const data_detectSubtitleFormat: typeof detectSubtitleFormat;
|
|
|
377
409
|
declare const data_diffEnvExample: typeof diffEnvExample;
|
|
378
410
|
declare const data_envToExport: typeof envToExport;
|
|
379
411
|
declare const data_envToJson: typeof envToJson;
|
|
412
|
+
declare const data_findCsvDuplicateRows: typeof findCsvDuplicateRows;
|
|
380
413
|
declare const data_formatNdjson: typeof formatNdjson;
|
|
381
414
|
declare const data_formatSubtitleTimestamp: typeof formatSubtitleTimestamp;
|
|
382
415
|
declare const data_formatToml: typeof formatToml;
|
|
@@ -416,7 +449,7 @@ declare const data_validateXml: typeof validateXml;
|
|
|
416
449
|
declare const data_validateYaml: typeof validateYaml;
|
|
417
450
|
declare const data_xmlToJson: typeof xmlToJson;
|
|
418
451
|
declare namespace data {
|
|
419
|
-
export { type data_ConvertedSubtitles as ConvertedSubtitles, 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_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, 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, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, 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_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_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 };
|
|
452
|
+
export { type data_ConvertedSubtitles as ConvertedSubtitles, 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_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, 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, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, 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_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_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 };
|
|
420
453
|
}
|
|
421
454
|
|
|
422
|
-
export {
|
|
455
|
+
export { minifyNdjson as $, findCsvDuplicateRows as A, formatNdjson as B, type ConvertedSubtitles as C, formatSubtitleTimestamp as D, type EnvDiffError as E, type FrontMatterError as F, formatToml as G, formatXml as H, type IniSection as I, generateMarkdownToc as J, getSection as K, getSectionNames as L, type MarkdownTocEntry as M, type NdjsonLineResult as N, getTomlStats as O, type ParseOptions as P, getXmlStats as Q, getYamlStats as R, type SubtitleCue as S, type TomlFormatResult as T, iniToJson as U, type ValidationResult as V, jsonArrayToNdjson as W, type XmlFormatResult as X, jsonToIni as Y, jsonToToml as Z, jsonToXml as _, type CsvDuplicateGroup as a, minifyToml as a0, minifyXml as a1, ndjsonToJsonArray as a2, parseCsv as a3, parseEnv as a4, parseFrontMatter as a5, parseIni as a6, parseSubtitleTimestamp as a7, parseSubtitles as a8, parseXmlToObject as a9, serializeSubtitles as aa, shiftSubtitles as ab, stringifyIni as ac, toCsvString as ad, tomlToJson as ae, validateEnvKey as af, validateIni as ag, validateNdjson as ah, validateToml as ai, validateXml as aj, validateYaml as ak, xmlToJson as al, type CsvDuplicateOptions as b, type CsvDuplicateResult as c, data as d, type CsvParseResult as e, type CsvToSqlOptions as f, type CsvToSqlResult as g, type EnvDiffResult as h, type EnvEntry as i, type EnvParseResult as j, type FrontMatterResult as k, type MarkdownTocOptions as l, type MarkdownTocResult as m, type NdjsonValidateResult as n, type ParsedIni as o, type ParsedSubtitles as p, type SubtitleFormat as q, type XmlToJsonOptions as r, convertSubtitles as s, csvToJson as t, csvToSqlInsert as u, detectDelimiter as v, detectSubtitleFormat as w, diffEnvExample as x, envToExport as y, envToJson as z };
|