@utilix-tech/sdk 0.54.0 → 0.56.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 +16 -6
- package/dist/{chunk-3KIUADK4.js → chunk-56VFNHVO.js} +55 -1
- package/dist/{chunk-NKN656TQ.js → chunk-MRIGQRTU.js} +79 -1
- package/dist/{chunk-DEBIH7QS.js → chunk-TVSQ53TZ.js} +55 -1
- package/dist/{data-CupeugaR.d.ts → data-Cvyg8ZXo.d.cts} +35 -2
- package/dist/{data-CupeugaR.d.cts → data-Cvyg8ZXo.d.ts} +35 -2
- package/dist/index.cjs +186 -0
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/{network-C6IcHeMB.d.ts → network-CoGf7_Op.d.cts} +37 -2
- package/dist/{network-C6IcHeMB.d.cts → network-CoGf7_Op.d.ts} +37 -2
- package/dist/tools/data.cjs +54 -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 +54 -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 +78 -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-p-1Ikx7l.d.cts → units-BM9GkUZW.d.cts} +71 -2
- package/dist/{units-p-1Ikx7l.d.ts → units-BM9GkUZW.d.ts} +71 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5172,6 +5172,7 @@ __export(data_exports, {
|
|
|
5172
5172
|
getTomlStats: () => getTomlStats,
|
|
5173
5173
|
getXmlStats: () => getXmlStats,
|
|
5174
5174
|
getYamlStats: () => getYamlStats,
|
|
5175
|
+
inferCsvColumnTypes: () => inferCsvColumnTypes,
|
|
5175
5176
|
iniToJson: () => iniToJson,
|
|
5176
5177
|
jsonArrayToNdjson: () => jsonArrayToNdjson,
|
|
5177
5178
|
jsonToIni: () => jsonToIni,
|
|
@@ -6756,6 +6757,59 @@ function findCsvDuplicateRows(input, options) {
|
|
|
6756
6757
|
uniqueRowCount: parsed.rows.length - duplicateRowCount + duplicateGroups.length
|
|
6757
6758
|
};
|
|
6758
6759
|
}
|
|
6760
|
+
var _ISO_DATE_RE = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})?)?$/;
|
|
6761
|
+
function _classifyCsvValue(raw) {
|
|
6762
|
+
const v = raw.trim();
|
|
6763
|
+
if (v === "") return "empty";
|
|
6764
|
+
if (/^(true|false)$/i.test(v)) return "boolean";
|
|
6765
|
+
if (/^-?\d+$/.test(v)) return "integer";
|
|
6766
|
+
if (/^-?\d+\.\d+$/.test(v)) return "float";
|
|
6767
|
+
if (_ISO_DATE_RE.test(v)) return "date";
|
|
6768
|
+
return "string";
|
|
6769
|
+
}
|
|
6770
|
+
function inferCsvColumnTypes(input, options) {
|
|
6771
|
+
const parsed = parseCsv(input, {
|
|
6772
|
+
delimiter: options?.delimiter ?? ",",
|
|
6773
|
+
hasHeader: options?.hasHeader !== false
|
|
6774
|
+
});
|
|
6775
|
+
if ("error" in parsed) return parsed;
|
|
6776
|
+
const columns = parsed.headers.map((name, colIdx) => {
|
|
6777
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6778
|
+
let sawString = false;
|
|
6779
|
+
let nullCount = 0;
|
|
6780
|
+
const sampleValues = [];
|
|
6781
|
+
for (const row of parsed.rows) {
|
|
6782
|
+
const raw = row[colIdx] ?? "";
|
|
6783
|
+
const kind = _classifyCsvValue(raw);
|
|
6784
|
+
if (kind === "empty") {
|
|
6785
|
+
nullCount++;
|
|
6786
|
+
continue;
|
|
6787
|
+
}
|
|
6788
|
+
if (sampleValues.length < 3) sampleValues.push(raw);
|
|
6789
|
+
if (kind === "string") sawString = true;
|
|
6790
|
+
else seen.add(kind);
|
|
6791
|
+
}
|
|
6792
|
+
let inferredType;
|
|
6793
|
+
if (sawString || seen.size === 0) {
|
|
6794
|
+
inferredType = "string";
|
|
6795
|
+
} else if (seen.size === 1) {
|
|
6796
|
+
inferredType = [...seen][0];
|
|
6797
|
+
} else if (seen.has("integer") && seen.has("float") && seen.size === 2) {
|
|
6798
|
+
inferredType = "float";
|
|
6799
|
+
} else {
|
|
6800
|
+
inferredType = "string";
|
|
6801
|
+
}
|
|
6802
|
+
return {
|
|
6803
|
+
name,
|
|
6804
|
+
inferredType,
|
|
6805
|
+
nullable: nullCount > 0,
|
|
6806
|
+
nullCount,
|
|
6807
|
+
totalCount: parsed.rows.length,
|
|
6808
|
+
sampleValues
|
|
6809
|
+
};
|
|
6810
|
+
});
|
|
6811
|
+
return { columns, rowCount: parsed.rows.length };
|
|
6812
|
+
}
|
|
6759
6813
|
var _YAML_ANCHOR_RE = /(?:^|\s)&([A-Za-z0-9_.-]+)/g;
|
|
6760
6814
|
var _YAML_ALIAS_RE = /(?:^|\s)\*([A-Za-z0-9_.-]+)/g;
|
|
6761
6815
|
function _stripYamlLineComment(line) {
|
|
@@ -8284,6 +8338,7 @@ __export(units_exports, {
|
|
|
8284
8338
|
bumpVersion: () => bumpVersion,
|
|
8285
8339
|
calcAspectRatio: () => calcAspectRatio,
|
|
8286
8340
|
calcSubnet: () => calcSubnet,
|
|
8341
|
+
calculateBlendedLoanRate: () => calculateBlendedLoanRate,
|
|
8287
8342
|
calculateBreakEven: () => calculateBreakEven,
|
|
8288
8343
|
calculateCashBreakdown: () => calculateCashBreakdown,
|
|
8289
8344
|
calculateCashRounding: () => calculateCashRounding,
|
|
@@ -8291,6 +8346,7 @@ __export(units_exports, {
|
|
|
8291
8346
|
calculateChange: () => calculateChange,
|
|
8292
8347
|
calculateCompoundInterest: () => calculateCompoundInterest,
|
|
8293
8348
|
calculateCreditUtilization: () => calculateCreditUtilization,
|
|
8349
|
+
calculateDebtToIncomeRatio: () => calculateDebtToIncomeRatio,
|
|
8294
8350
|
calculateDepreciationSchedule: () => calculateDepreciationSchedule,
|
|
8295
8351
|
calculateDiscount: () => calculateDiscount,
|
|
8296
8352
|
calculateEmi: () => calculateEmi,
|
|
@@ -10496,6 +10552,82 @@ function calculateCreditUtilization(accounts) {
|
|
|
10496
10552
|
overallTier: _classifyUtilization(overallUtilizationPercent)
|
|
10497
10553
|
};
|
|
10498
10554
|
}
|
|
10555
|
+
function _classifyDti(percent) {
|
|
10556
|
+
if (percent < 36) return "healthy";
|
|
10557
|
+
if (percent < 43) return "moderate";
|
|
10558
|
+
if (percent < 50) return "high";
|
|
10559
|
+
return "severe";
|
|
10560
|
+
}
|
|
10561
|
+
function calculateDebtToIncomeRatio(debts, grossMonthlyIncome) {
|
|
10562
|
+
if (!Array.isArray(debts) || debts.length === 0) {
|
|
10563
|
+
return { error: "debts must be a non-empty array" };
|
|
10564
|
+
}
|
|
10565
|
+
if (typeof grossMonthlyIncome !== "number" || !Number.isFinite(grossMonthlyIncome) || grossMonthlyIncome <= 0) {
|
|
10566
|
+
return { error: "grossMonthlyIncome must be a finite number greater than zero" };
|
|
10567
|
+
}
|
|
10568
|
+
const round23 = (n) => Math.round(n * 100) / 100;
|
|
10569
|
+
let totalMonthlyDebt = 0;
|
|
10570
|
+
const results = [];
|
|
10571
|
+
for (let i = 0; i < debts.length; i++) {
|
|
10572
|
+
const debt = debts[i];
|
|
10573
|
+
if (typeof debt.amount !== "number" || !Number.isFinite(debt.amount) || debt.amount < 0) {
|
|
10574
|
+
return { error: `debt ${i + 1}: amount must be a finite, non-negative number` };
|
|
10575
|
+
}
|
|
10576
|
+
totalMonthlyDebt += debt.amount;
|
|
10577
|
+
results.push({
|
|
10578
|
+
label: debt.label?.trim() || `Debt ${i + 1}`,
|
|
10579
|
+
amount: debt.amount,
|
|
10580
|
+
percentOfIncome: round23(debt.amount / grossMonthlyIncome * 100)
|
|
10581
|
+
});
|
|
10582
|
+
}
|
|
10583
|
+
const dtiPercent = round23(totalMonthlyDebt / grossMonthlyIncome * 100);
|
|
10584
|
+
return {
|
|
10585
|
+
debts: results,
|
|
10586
|
+
totalMonthlyDebt: round23(totalMonthlyDebt),
|
|
10587
|
+
grossMonthlyIncome,
|
|
10588
|
+
dtiPercent,
|
|
10589
|
+
tier: _classifyDti(dtiPercent)
|
|
10590
|
+
};
|
|
10591
|
+
}
|
|
10592
|
+
function calculateBlendedLoanRate(loans) {
|
|
10593
|
+
if (!Array.isArray(loans) || loans.length === 0) {
|
|
10594
|
+
return { error: "loans must be a non-empty array" };
|
|
10595
|
+
}
|
|
10596
|
+
const round23 = (n) => Math.round(n * 100) / 100;
|
|
10597
|
+
const round4 = (n) => Math.round(n * 1e4) / 1e4;
|
|
10598
|
+
let totalBalance = 0;
|
|
10599
|
+
for (let i = 0; i < loans.length; i++) {
|
|
10600
|
+
const loan = loans[i];
|
|
10601
|
+
if (typeof loan.balance !== "number" || !Number.isFinite(loan.balance) || loan.balance <= 0) {
|
|
10602
|
+
return { error: `loan ${i + 1}: balance must be a finite number greater than zero` };
|
|
10603
|
+
}
|
|
10604
|
+
if (typeof loan.ratePercent !== "number" || !Number.isFinite(loan.ratePercent) || loan.ratePercent < 0) {
|
|
10605
|
+
return { error: `loan ${i + 1}: ratePercent must be a finite, non-negative number` };
|
|
10606
|
+
}
|
|
10607
|
+
totalBalance += loan.balance;
|
|
10608
|
+
}
|
|
10609
|
+
let totalMonthlyInterest = 0;
|
|
10610
|
+
let weightedRateSum = 0;
|
|
10611
|
+
const results = loans.map((loan, i) => {
|
|
10612
|
+
const monthlyInterest = round23(loan.balance * loan.ratePercent / 100 / 12);
|
|
10613
|
+
totalMonthlyInterest += monthlyInterest;
|
|
10614
|
+
weightedRateSum += loan.balance * loan.ratePercent;
|
|
10615
|
+
return {
|
|
10616
|
+
label: loan.label?.trim() || `Loan ${i + 1}`,
|
|
10617
|
+
balance: loan.balance,
|
|
10618
|
+
ratePercent: loan.ratePercent,
|
|
10619
|
+
monthlyInterest,
|
|
10620
|
+
shareOfTotalPercent: round23(loan.balance / totalBalance * 100)
|
|
10621
|
+
};
|
|
10622
|
+
});
|
|
10623
|
+
return {
|
|
10624
|
+
loans: results,
|
|
10625
|
+
totalBalance: round23(totalBalance),
|
|
10626
|
+
weightedAverageRatePercent: round4(weightedRateSum / totalBalance),
|
|
10627
|
+
totalMonthlyInterest: round23(totalMonthlyInterest),
|
|
10628
|
+
totalAnnualInterest: round23(totalMonthlyInterest * 12)
|
|
10629
|
+
};
|
|
10630
|
+
}
|
|
10499
10631
|
|
|
10500
10632
|
// src/tools/network.ts
|
|
10501
10633
|
var network_exports = {};
|
|
@@ -10510,6 +10642,7 @@ __export(network_exports, {
|
|
|
10510
10642
|
X_CONTENT_TYPE_OPTIONS_HEADER: () => X_CONTENT_TYPE_OPTIONS_HEADER,
|
|
10511
10643
|
analyzeEmailHeaders: () => analyzeEmailHeaders,
|
|
10512
10644
|
assessContentTypeRisk: () => assessContentTypeRisk,
|
|
10645
|
+
buildAcceptLanguage: () => buildAcceptLanguage,
|
|
10513
10646
|
buildCacheControl: () => buildCacheControl,
|
|
10514
10647
|
buildClientHints: () => buildClientHints,
|
|
10515
10648
|
buildContentDisposition: () => buildContentDisposition,
|
|
@@ -10537,6 +10670,7 @@ __export(network_exports, {
|
|
|
10537
10670
|
isValidIp: () => isValidIp2,
|
|
10538
10671
|
isValidIpv4: () => isValidIpv42,
|
|
10539
10672
|
isValidIpv6: () => isValidIpv6,
|
|
10673
|
+
parseAcceptLanguage: () => parseAcceptLanguage,
|
|
10540
10674
|
parseClientHintHeaders: () => parseClientHintHeaders,
|
|
10541
10675
|
parseContentDisposition: () => parseContentDisposition,
|
|
10542
10676
|
parseContentRangeHeader: () => parseContentRangeHeader,
|
|
@@ -13329,6 +13463,58 @@ function assessContentTypeRisk(contentType) {
|
|
|
13329
13463
|
reason: "Not a well-known type in this tool's lookup table. Treat any response type as sniffable unless you've confirmed the serving browser trusts it, and set nosniff regardless of type as a baseline defense."
|
|
13330
13464
|
};
|
|
13331
13465
|
}
|
|
13466
|
+
function formatAcceptLanguageQuality(q) {
|
|
13467
|
+
let s = q.toFixed(3);
|
|
13468
|
+
s = s.replace(/0+$/, "");
|
|
13469
|
+
s = s.replace(/\.$/, "");
|
|
13470
|
+
return s;
|
|
13471
|
+
}
|
|
13472
|
+
function formatAcceptLanguageEntries(entries) {
|
|
13473
|
+
return entries.map((e) => e.quality === 1 ? e.locale : `${e.locale};q=${formatAcceptLanguageQuality(e.quality)}`).join(", ");
|
|
13474
|
+
}
|
|
13475
|
+
function sortAcceptLanguageEntries(entries) {
|
|
13476
|
+
return entries.map((e, i) => ({ e, i })).sort((a, b) => b.e.quality - a.e.quality || a.i - b.i).map((x) => x.e);
|
|
13477
|
+
}
|
|
13478
|
+
function buildAcceptLanguage(locales) {
|
|
13479
|
+
if (!Array.isArray(locales) || locales.length === 0) return { error: "At least one locale is required" };
|
|
13480
|
+
const entries = [];
|
|
13481
|
+
for (let i = 0; i < locales.length; i++) {
|
|
13482
|
+
const { locale, quality } = locales[i];
|
|
13483
|
+
if (typeof locale !== "string" || locale.trim() === "") return { error: `locale ${i + 1}: locale is required` };
|
|
13484
|
+
const q = quality === void 0 ? 1 : quality;
|
|
13485
|
+
if (typeof q !== "number" || !Number.isFinite(q) || q < 0 || q > 1) {
|
|
13486
|
+
return { error: `locale ${i + 1}: quality must be between 0 and 1` };
|
|
13487
|
+
}
|
|
13488
|
+
entries.push({ locale: locale.trim(), quality: Math.round(q * 1e3) / 1e3 });
|
|
13489
|
+
}
|
|
13490
|
+
const sorted = sortAcceptLanguageEntries(entries);
|
|
13491
|
+
const headerValue = formatAcceptLanguageEntries(sorted);
|
|
13492
|
+
return { header: `Accept-Language: ${headerValue}`, headerValue, entries: sorted };
|
|
13493
|
+
}
|
|
13494
|
+
function parseAcceptLanguage(raw) {
|
|
13495
|
+
if (!raw || raw.trim() === "") return { error: "Input is empty" };
|
|
13496
|
+
const withoutLabel = raw.trim().replace(/^accept-language:\s*/i, "");
|
|
13497
|
+
const parts = withoutLabel.split(",").map((p) => p.trim()).filter((p) => p.length > 0);
|
|
13498
|
+
if (parts.length === 0) return { error: "Input is empty" };
|
|
13499
|
+
const entries = [];
|
|
13500
|
+
for (const part of parts) {
|
|
13501
|
+
const [localeRaw, ...paramsRaw] = part.split(";").map((s) => s.trim());
|
|
13502
|
+
if (!localeRaw) return { error: `Invalid entry: "${part}"` };
|
|
13503
|
+
let quality = 1;
|
|
13504
|
+
for (const param of paramsRaw) {
|
|
13505
|
+
const m = /^q=([\d.]+)$/i.exec(param);
|
|
13506
|
+
if (!m) return { error: `Invalid parameter in "${part}"` };
|
|
13507
|
+
quality = Number(m[1]);
|
|
13508
|
+
if (!Number.isFinite(quality) || quality < 0 || quality > 1) {
|
|
13509
|
+
return { error: `q value must be between 0 and 1 in "${part}"` };
|
|
13510
|
+
}
|
|
13511
|
+
}
|
|
13512
|
+
entries.push({ locale: localeRaw, quality: Math.round(quality * 1e3) / 1e3 });
|
|
13513
|
+
}
|
|
13514
|
+
const sorted = sortAcceptLanguageEntries(entries);
|
|
13515
|
+
const headerValue = formatAcceptLanguageEntries(sorted);
|
|
13516
|
+
return { header: `Accept-Language: ${headerValue}`, headerValue, entries: sorted };
|
|
13517
|
+
}
|
|
13332
13518
|
|
|
13333
13519
|
// src/tools/api.ts
|
|
13334
13520
|
var api_exports = {};
|
package/dist/index.d.cts
CHANGED
|
@@ -2,11 +2,11 @@ export { j as json } from './json-Ta9JykSB.cjs';
|
|
|
2
2
|
export { e as encoding } from './encoding-Dk3wpmb3.cjs';
|
|
3
3
|
export { h as hashing } from './hashing-CJjlvqS_.cjs';
|
|
4
4
|
export { t as text } from './text-DWUcY8H1.cjs';
|
|
5
|
-
export { d as data } from './data-
|
|
5
|
+
export { d as data } from './data-Cvyg8ZXo.cjs';
|
|
6
6
|
export { g as generators } from './generators-Du8cBesn.cjs';
|
|
7
7
|
export { t as time } from './time-KqJjdqII.cjs';
|
|
8
|
-
export { u as units } from './units-
|
|
9
|
-
export { n as network } from './network-
|
|
8
|
+
export { u as units } from './units-BM9GkUZW.cjs';
|
|
9
|
+
export { n as network } from './network-CoGf7_Op.cjs';
|
|
10
10
|
export { a as api } from './api-DmTNE4c1.cjs';
|
|
11
11
|
export { c as code } from './code-rxidGgvB.cjs';
|
|
12
12
|
export { c as color } from './color-tPwZCr9H.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ export { j as json } from './json-Ta9JykSB.js';
|
|
|
2
2
|
export { e as encoding } from './encoding-Dk3wpmb3.js';
|
|
3
3
|
export { h as hashing } from './hashing-CJjlvqS_.js';
|
|
4
4
|
export { t as text } from './text-DWUcY8H1.js';
|
|
5
|
-
export { d as data } from './data-
|
|
5
|
+
export { d as data } from './data-Cvyg8ZXo.js';
|
|
6
6
|
export { g as generators } from './generators-Du8cBesn.js';
|
|
7
7
|
export { t as time } from './time-KqJjdqII.js';
|
|
8
|
-
export { u as units } from './units-
|
|
9
|
-
export { n as network } from './network-
|
|
8
|
+
export { u as units } from './units-BM9GkUZW.js';
|
|
9
|
+
export { n as network } from './network-CoGf7_Op.js';
|
|
10
10
|
export { a as api } from './api-DmTNE4c1.js';
|
|
11
11
|
export { c as code } from './code-rxidGgvB.js';
|
|
12
12
|
export { c as color } from './color-tPwZCr9H.js';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { media_exports as media } from './chunk-226EH3ZI.js';
|
|
2
|
-
export { units_exports as units } from './chunk-
|
|
3
|
-
export { network_exports as network } from './chunk-
|
|
2
|
+
export { units_exports as units } from './chunk-MRIGQRTU.js';
|
|
3
|
+
export { network_exports as network } from './chunk-TVSQ53TZ.js';
|
|
4
4
|
export { api_exports as api } from './chunk-52ZDKSIX.js';
|
|
5
5
|
export { code_exports as code } from './chunk-JW4NG2GN.js';
|
|
6
6
|
export { color_exports as color } from './chunk-BPVAB4P2.js';
|
|
@@ -11,7 +11,7 @@ export { json_exports as json } from './chunk-WVEKRKGU.js';
|
|
|
11
11
|
export { encoding_exports as encoding } from './chunk-DOWQZUTP.js';
|
|
12
12
|
export { hashing_exports as hashing } from './chunk-PET2CGTH.js';
|
|
13
13
|
export { text_exports as text } from './chunk-P7TXG7CI.js';
|
|
14
|
-
export { data_exports as data } from './chunk-
|
|
14
|
+
export { data_exports as data } from './chunk-56VFNHVO.js';
|
|
15
15
|
export { generators_exports as generators } from './chunk-3TYWIX3B.js';
|
|
16
16
|
export { time_exports as time } from './chunk-IEPWZERQ.js';
|
|
17
17
|
import './chunk-MLKGABMK.js';
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* - vary-header-builder: buildVaryHeader, parseVaryHeader
|
|
23
23
|
* - permissions-policy-builder: buildPermissionsPolicy, parsePermissionsPolicy
|
|
24
24
|
* - x-content-type-options-builder: buildXContentTypeOptionsHeader, parseXContentTypeOptionsHeader, assessContentTypeRisk
|
|
25
|
+
* - accept-language-parser: parseAcceptLanguage, buildAcceptLanguage
|
|
25
26
|
*/
|
|
26
27
|
declare const DNS_RECORD_TYPES: readonly ["A", "AAAA", "CNAME", "MX", "TXT", "NS", "SOA", "PTR", "SRV", "CAA"];
|
|
27
28
|
type DnsRecordType = typeof DNS_RECORD_TYPES[number];
|
|
@@ -743,7 +744,39 @@ interface ContentTypeRiskResult {
|
|
|
743
744
|
declare function assessContentTypeRisk(contentType: string): ContentTypeRiskResult | {
|
|
744
745
|
error: string;
|
|
745
746
|
};
|
|
747
|
+
interface AcceptLanguageEntry {
|
|
748
|
+
locale: string;
|
|
749
|
+
quality: number;
|
|
750
|
+
}
|
|
751
|
+
interface AcceptLanguageResult {
|
|
752
|
+
header: string;
|
|
753
|
+
headerValue: string;
|
|
754
|
+
entries: AcceptLanguageEntry[];
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Build an `Accept-Language` request-header value from a list of locale/
|
|
758
|
+
* quality pairs, sorting by descending quality (ties keep their original
|
|
759
|
+
* order) and omitting `;q=1` for the default weight, per RFC 9110 section
|
|
760
|
+
* 12.5.4.
|
|
761
|
+
*/
|
|
762
|
+
declare function buildAcceptLanguage(locales: {
|
|
763
|
+
locale: string;
|
|
764
|
+
quality?: number;
|
|
765
|
+
}[]): AcceptLanguageResult | {
|
|
766
|
+
error: string;
|
|
767
|
+
};
|
|
768
|
+
/**
|
|
769
|
+
* Parse an existing `Accept-Language` header value (with or without a
|
|
770
|
+
* leading `Accept-Language:` label) into its ranked locale/quality pairs,
|
|
771
|
+
* sorted by descending quality per RFC 9110 section 12.5.4 (a missing
|
|
772
|
+
* `;q=` defaults to 1).
|
|
773
|
+
*/
|
|
774
|
+
declare function parseAcceptLanguage(raw: string): AcceptLanguageResult | {
|
|
775
|
+
error: string;
|
|
776
|
+
};
|
|
746
777
|
|
|
778
|
+
type network_AcceptLanguageEntry = AcceptLanguageEntry;
|
|
779
|
+
type network_AcceptLanguageResult = AcceptLanguageResult;
|
|
747
780
|
type network_AuthResultEntry = AuthResultEntry;
|
|
748
781
|
type network_BuildRangeHeaderOptions = BuildRangeHeaderOptions;
|
|
749
782
|
declare const network_CLIENT_HINTS: typeof CLIENT_HINTS;
|
|
@@ -823,6 +856,7 @@ type network_XContentTypeOptionsParseResult = XContentTypeOptionsParseResult;
|
|
|
823
856
|
declare const network_X_CONTENT_TYPE_OPTIONS_HEADER: typeof X_CONTENT_TYPE_OPTIONS_HEADER;
|
|
824
857
|
declare const network_analyzeEmailHeaders: typeof analyzeEmailHeaders;
|
|
825
858
|
declare const network_assessContentTypeRisk: typeof assessContentTypeRisk;
|
|
859
|
+
declare const network_buildAcceptLanguage: typeof buildAcceptLanguage;
|
|
826
860
|
declare const network_buildCacheControl: typeof buildCacheControl;
|
|
827
861
|
declare const network_buildClientHints: typeof buildClientHints;
|
|
828
862
|
declare const network_buildContentDisposition: typeof buildContentDisposition;
|
|
@@ -850,6 +884,7 @@ declare const network_isSuccess: typeof isSuccess;
|
|
|
850
884
|
declare const network_isValidIp: typeof isValidIp;
|
|
851
885
|
declare const network_isValidIpv4: typeof isValidIpv4;
|
|
852
886
|
declare const network_isValidIpv6: typeof isValidIpv6;
|
|
887
|
+
declare const network_parseAcceptLanguage: typeof parseAcceptLanguage;
|
|
853
888
|
declare const network_parseClientHintHeaders: typeof parseClientHintHeaders;
|
|
854
889
|
declare const network_parseContentDisposition: typeof parseContentDisposition;
|
|
855
890
|
declare const network_parseContentRangeHeader: typeof parseContentRangeHeader;
|
|
@@ -873,7 +908,7 @@ declare const network_validateManifest: typeof validateManifest;
|
|
|
873
908
|
declare const network_validateRobotsTxt: typeof validateRobotsTxt;
|
|
874
909
|
declare const network_validateSitemap: typeof validateSitemap;
|
|
875
910
|
declare namespace network {
|
|
876
|
-
export { type network_AuthResultEntry as AuthResultEntry, type network_BuildRangeHeaderOptions as BuildRangeHeaderOptions, network_CLIENT_HINTS as CLIENT_HINTS, type network_CacheControlDirective as CacheControlDirective, type network_CacheControlOptions as CacheControlOptions, type network_CacheControlResult as CacheControlResult, type network_ClientHintDef as ClientHintDef, type network_ClientHintValueType as ClientHintValueType, type network_ClientHintsBuildResult as ClientHintsBuildResult, type network_ClientHintsParseResult as ClientHintsParseResult, type network_ContentDispositionBuildOptions as ContentDispositionBuildOptions, type network_ContentDispositionBuildResult as ContentDispositionBuildResult, type network_ContentDispositionParseResult as ContentDispositionParseResult, type network_ContentRangeResult as ContentRangeResult, type network_ContentTypeRiskResult as ContentTypeRiskResult, type network_ContentTypeSniffRisk as ContentTypeSniffRisk, type network_CookieAttributes as CookieAttributes, type network_CookieCheckResult as CookieCheckResult, network_DNS_RECORD_TYPES as DNS_RECORD_TYPES, type network_DnsRecord as DnsRecord, type network_DnsRecordType as DnsRecordType, type network_DnsResponse as DnsResponse, type network_EmailHeaderAnalysis as EmailHeaderAnalysis, type network_EmailHeaderField as EmailHeaderField, type network_GeoResult as GeoResult, network_HTTP_HEADERS as HTTP_HEADERS, type network_HarEntry as HarEntry, type network_HarParseResult as HarParseResult, type network_HarSummary as HarSummary, type network_HeaderCategory as HeaderCategory, type network_HttpHeader as HttpHeader, type network_Ipv6AddressType as Ipv6AddressType, type network_Ipv6ParseResult as Ipv6ParseResult, network_LINK_REL_VALUES as LINK_REL_VALUES, type network_LinkHeaderEntry as LinkHeaderEntry, type network_LinkHeaderEntryInput as LinkHeaderEntryInput, type network_LinkHeaderResult as LinkHeaderResult, type network_LinkRel as LinkRel, type network_ManifestIconInfo as ManifestIconInfo, type network_ManifestIssue as ManifestIssue, type network_ManifestValidationResult as ManifestValidationResult, network_PERMISSIONS_POLICY_FEATURES as PERMISSIONS_POLICY_FEATURES, type network_ParsedClientHint as ParsedClientHint, type network_ParsedDnsResult as ParsedDnsResult, type network_ParsedGeoResult as ParsedGeoResult, type network_PermissionsPolicyDirective as PermissionsPolicyDirective, type network_PermissionsPolicyFeatureInput as PermissionsPolicyFeatureInput, type network_PermissionsPolicyResult as PermissionsPolicyResult, network_REFERRER_POLICY_VALUES as REFERRER_POLICY_VALUES, type network_RangeEntry as RangeEntry, type network_RangeEntryInput as RangeEntryInput, type network_RangeHeaderResult as RangeHeaderResult, type network_ReceivedHop as ReceivedHop, type network_ReferrerPolicyEntry as ReferrerPolicyEntry, type network_ReferrerPolicyResult as ReferrerPolicyResult, type network_ReferrerPolicyValue as ReferrerPolicyValue, type network_RobotsGroup as RobotsGroup, type network_RobotsIssue as RobotsIssue, type network_RobotsRule as RobotsRule, type network_RobotsValidationResult as RobotsValidationResult, network_STATUS_CODES as STATUS_CODES, type network_SameSiteValue as SameSiteValue, type network_SitemapIndexEntry as SitemapIndexEntry, type network_SitemapIssue as SitemapIssue, type network_SitemapSplitFile as SitemapSplitFile, type network_SitemapUrlEntry as SitemapUrlEntry, type network_SitemapValidationResult as SitemapValidationResult, type network_SplitSitemapOptions as SplitSitemapOptions, type network_SplitSitemapResult as SplitSitemapResult, type network_StatusCode as StatusCode, type network_UaDeviceType as UaDeviceType, type network_UserAgentInfo as UserAgentInfo, type network_VaryHeaderEntry as VaryHeaderEntry, type network_VaryHeaderResult as VaryHeaderResult, type network_XContentTypeOptionsHeader as XContentTypeOptionsHeader, type network_XContentTypeOptionsParseResult as XContentTypeOptionsParseResult, network_X_CONTENT_TYPE_OPTIONS_HEADER as X_CONTENT_TYPE_OPTIONS_HEADER, network_analyzeEmailHeaders as analyzeEmailHeaders, network_assessContentTypeRisk as assessContentTypeRisk, network_buildCacheControl as buildCacheControl, network_buildClientHints as buildClientHints, network_buildContentDisposition as buildContentDisposition, network_buildDnsQueryUrl as buildDnsQueryUrl, network_buildGeoUrl as buildGeoUrl, network_buildLinkHeader as buildLinkHeader, network_buildMapUrl as buildMapUrl, network_buildPermissionsPolicy as buildPermissionsPolicy, network_buildRangeHeader as buildRangeHeader, network_buildReferrerPolicy as buildReferrerPolicy, network_buildVaryHeader as buildVaryHeader, network_buildXContentTypeOptionsHeader as buildXContentTypeOptionsHeader, network_checkSetCookieHeader as checkSetCookieHeader, network_countryCodeToFlag as countryCodeToFlag, network_formatCoordinates as formatCoordinates, network_formatTtl as formatTtl, network_getByCategory as getByCategory, network_getHeader as getHeader, network_getHeadersByCategory as getHeadersByCategory, network_getStatusByCategory as getStatusByCategory, network_getStatusCode as getStatusCode, network_isClientError as isClientError, network_isServerError as isServerError, network_isSuccess as isSuccess, network_isValidIp as isValidIp, network_isValidIpv4 as isValidIpv4, network_isValidIpv6 as isValidIpv6, network_parseClientHintHeaders as parseClientHintHeaders, network_parseContentDisposition as parseContentDisposition, network_parseContentRangeHeader as parseContentRangeHeader, network_parseDnsResponse as parseDnsResponse, network_parseGeoResponse as parseGeoResponse, network_parseHar as parseHar, network_parseIpv6Address as parseIpv6Address, network_parsePermissionsPolicy as parsePermissionsPolicy, network_parseUserAgent as parseUserAgent, network_parseVaryHeader as parseVaryHeader, network_parseXContentTypeOptionsHeader as parseXContentTypeOptionsHeader, network_searchHeaders as searchHeaders, network_searchStatusCodes as searchStatusCodes, network_splitSitemap as splitSitemap, network_statusCodeToText as statusCodeToText, network_typeNumberToLabel as typeNumberToLabel, network_validateDomain as validateDomain, network_validateHeaderName as validateHeaderName, network_validateHeaderValue as validateHeaderValue, network_validateManifest as validateManifest, network_validateRobotsTxt as validateRobotsTxt, network_validateSitemap as validateSitemap };
|
|
911
|
+
export { type network_AcceptLanguageEntry as AcceptLanguageEntry, type network_AcceptLanguageResult as AcceptLanguageResult, type network_AuthResultEntry as AuthResultEntry, type network_BuildRangeHeaderOptions as BuildRangeHeaderOptions, network_CLIENT_HINTS as CLIENT_HINTS, type network_CacheControlDirective as CacheControlDirective, type network_CacheControlOptions as CacheControlOptions, type network_CacheControlResult as CacheControlResult, type network_ClientHintDef as ClientHintDef, type network_ClientHintValueType as ClientHintValueType, type network_ClientHintsBuildResult as ClientHintsBuildResult, type network_ClientHintsParseResult as ClientHintsParseResult, type network_ContentDispositionBuildOptions as ContentDispositionBuildOptions, type network_ContentDispositionBuildResult as ContentDispositionBuildResult, type network_ContentDispositionParseResult as ContentDispositionParseResult, type network_ContentRangeResult as ContentRangeResult, type network_ContentTypeRiskResult as ContentTypeRiskResult, type network_ContentTypeSniffRisk as ContentTypeSniffRisk, type network_CookieAttributes as CookieAttributes, type network_CookieCheckResult as CookieCheckResult, network_DNS_RECORD_TYPES as DNS_RECORD_TYPES, type network_DnsRecord as DnsRecord, type network_DnsRecordType as DnsRecordType, type network_DnsResponse as DnsResponse, type network_EmailHeaderAnalysis as EmailHeaderAnalysis, type network_EmailHeaderField as EmailHeaderField, type network_GeoResult as GeoResult, network_HTTP_HEADERS as HTTP_HEADERS, type network_HarEntry as HarEntry, type network_HarParseResult as HarParseResult, type network_HarSummary as HarSummary, type network_HeaderCategory as HeaderCategory, type network_HttpHeader as HttpHeader, type network_Ipv6AddressType as Ipv6AddressType, type network_Ipv6ParseResult as Ipv6ParseResult, network_LINK_REL_VALUES as LINK_REL_VALUES, type network_LinkHeaderEntry as LinkHeaderEntry, type network_LinkHeaderEntryInput as LinkHeaderEntryInput, type network_LinkHeaderResult as LinkHeaderResult, type network_LinkRel as LinkRel, type network_ManifestIconInfo as ManifestIconInfo, type network_ManifestIssue as ManifestIssue, type network_ManifestValidationResult as ManifestValidationResult, network_PERMISSIONS_POLICY_FEATURES as PERMISSIONS_POLICY_FEATURES, type network_ParsedClientHint as ParsedClientHint, type network_ParsedDnsResult as ParsedDnsResult, type network_ParsedGeoResult as ParsedGeoResult, type network_PermissionsPolicyDirective as PermissionsPolicyDirective, type network_PermissionsPolicyFeatureInput as PermissionsPolicyFeatureInput, type network_PermissionsPolicyResult as PermissionsPolicyResult, network_REFERRER_POLICY_VALUES as REFERRER_POLICY_VALUES, type network_RangeEntry as RangeEntry, type network_RangeEntryInput as RangeEntryInput, type network_RangeHeaderResult as RangeHeaderResult, type network_ReceivedHop as ReceivedHop, type network_ReferrerPolicyEntry as ReferrerPolicyEntry, type network_ReferrerPolicyResult as ReferrerPolicyResult, type network_ReferrerPolicyValue as ReferrerPolicyValue, type network_RobotsGroup as RobotsGroup, type network_RobotsIssue as RobotsIssue, type network_RobotsRule as RobotsRule, type network_RobotsValidationResult as RobotsValidationResult, network_STATUS_CODES as STATUS_CODES, type network_SameSiteValue as SameSiteValue, type network_SitemapIndexEntry as SitemapIndexEntry, type network_SitemapIssue as SitemapIssue, type network_SitemapSplitFile as SitemapSplitFile, type network_SitemapUrlEntry as SitemapUrlEntry, type network_SitemapValidationResult as SitemapValidationResult, type network_SplitSitemapOptions as SplitSitemapOptions, type network_SplitSitemapResult as SplitSitemapResult, type network_StatusCode as StatusCode, type network_UaDeviceType as UaDeviceType, type network_UserAgentInfo as UserAgentInfo, type network_VaryHeaderEntry as VaryHeaderEntry, type network_VaryHeaderResult as VaryHeaderResult, type network_XContentTypeOptionsHeader as XContentTypeOptionsHeader, type network_XContentTypeOptionsParseResult as XContentTypeOptionsParseResult, network_X_CONTENT_TYPE_OPTIONS_HEADER as X_CONTENT_TYPE_OPTIONS_HEADER, network_analyzeEmailHeaders as analyzeEmailHeaders, network_assessContentTypeRisk as assessContentTypeRisk, network_buildAcceptLanguage as buildAcceptLanguage, network_buildCacheControl as buildCacheControl, network_buildClientHints as buildClientHints, network_buildContentDisposition as buildContentDisposition, network_buildDnsQueryUrl as buildDnsQueryUrl, network_buildGeoUrl as buildGeoUrl, network_buildLinkHeader as buildLinkHeader, network_buildMapUrl as buildMapUrl, network_buildPermissionsPolicy as buildPermissionsPolicy, network_buildRangeHeader as buildRangeHeader, network_buildReferrerPolicy as buildReferrerPolicy, network_buildVaryHeader as buildVaryHeader, network_buildXContentTypeOptionsHeader as buildXContentTypeOptionsHeader, network_checkSetCookieHeader as checkSetCookieHeader, network_countryCodeToFlag as countryCodeToFlag, network_formatCoordinates as formatCoordinates, network_formatTtl as formatTtl, network_getByCategory as getByCategory, network_getHeader as getHeader, network_getHeadersByCategory as getHeadersByCategory, network_getStatusByCategory as getStatusByCategory, network_getStatusCode as getStatusCode, network_isClientError as isClientError, network_isServerError as isServerError, network_isSuccess as isSuccess, network_isValidIp as isValidIp, network_isValidIpv4 as isValidIpv4, network_isValidIpv6 as isValidIpv6, network_parseAcceptLanguage as parseAcceptLanguage, network_parseClientHintHeaders as parseClientHintHeaders, network_parseContentDisposition as parseContentDisposition, network_parseContentRangeHeader as parseContentRangeHeader, network_parseDnsResponse as parseDnsResponse, network_parseGeoResponse as parseGeoResponse, network_parseHar as parseHar, network_parseIpv6Address as parseIpv6Address, network_parsePermissionsPolicy as parsePermissionsPolicy, network_parseUserAgent as parseUserAgent, network_parseVaryHeader as parseVaryHeader, network_parseXContentTypeOptionsHeader as parseXContentTypeOptionsHeader, network_searchHeaders as searchHeaders, network_searchStatusCodes as searchStatusCodes, network_splitSitemap as splitSitemap, network_statusCodeToText as statusCodeToText, network_typeNumberToLabel as typeNumberToLabel, network_validateDomain as validateDomain, network_validateHeaderName as validateHeaderName, network_validateHeaderValue as validateHeaderValue, network_validateManifest as validateManifest, network_validateRobotsTxt as validateRobotsTxt, network_validateSitemap as validateSitemap };
|
|
877
912
|
}
|
|
878
913
|
|
|
879
|
-
export { type
|
|
914
|
+
export { type RangeEntryInput as $, type AcceptLanguageEntry as A, type BuildRangeHeaderOptions as B, CLIENT_HINTS as C, DNS_RECORD_TYPES as D, type EmailHeaderAnalysis as E, type HttpHeader as F, type GeoResult as G, HTTP_HEADERS as H, type Ipv6AddressType as I, type Ipv6ParseResult as J, type LinkHeaderEntry as K, LINK_REL_VALUES as L, type LinkHeaderEntryInput as M, type LinkHeaderResult as N, type LinkRel as O, type ManifestIconInfo as P, type ManifestIssue as Q, type ManifestValidationResult as R, PERMISSIONS_POLICY_FEATURES as S, type ParsedClientHint as T, type ParsedDnsResult as U, type ParsedGeoResult as V, type PermissionsPolicyDirective as W, type PermissionsPolicyFeatureInput as X, type PermissionsPolicyResult as Y, REFERRER_POLICY_VALUES as Z, type RangeEntry as _, type AcceptLanguageResult as a, parseIpv6Address as a$, type RangeHeaderResult as a0, type ReceivedHop as a1, type ReferrerPolicyEntry as a2, type ReferrerPolicyResult as a3, type ReferrerPolicyValue as a4, type RobotsGroup as a5, type RobotsIssue as a6, type RobotsRule as a7, type RobotsValidationResult as a8, STATUS_CODES as a9, buildPermissionsPolicy as aA, buildRangeHeader as aB, buildReferrerPolicy as aC, buildVaryHeader as aD, buildXContentTypeOptionsHeader as aE, checkSetCookieHeader as aF, countryCodeToFlag as aG, formatCoordinates as aH, formatTtl as aI, getByCategory as aJ, getHeader as aK, getHeadersByCategory as aL, getStatusByCategory as aM, getStatusCode as aN, isClientError as aO, isServerError as aP, isSuccess as aQ, isValidIp as aR, isValidIpv4 as aS, isValidIpv6 as aT, parseAcceptLanguage as aU, parseClientHintHeaders as aV, parseContentDisposition as aW, parseContentRangeHeader as aX, parseDnsResponse as aY, parseGeoResponse as aZ, parseHar as a_, type SameSiteValue as aa, type SitemapIndexEntry as ab, type SitemapIssue as ac, type SitemapSplitFile as ad, type SitemapUrlEntry as ae, type SitemapValidationResult as af, type SplitSitemapOptions as ag, type SplitSitemapResult as ah, type StatusCode as ai, type UaDeviceType as aj, type UserAgentInfo as ak, type VaryHeaderEntry as al, type VaryHeaderResult as am, type XContentTypeOptionsHeader as an, type XContentTypeOptionsParseResult as ao, X_CONTENT_TYPE_OPTIONS_HEADER as ap, analyzeEmailHeaders as aq, assessContentTypeRisk as ar, buildAcceptLanguage as as, buildCacheControl as at, buildClientHints as au, buildContentDisposition as av, buildDnsQueryUrl as aw, buildGeoUrl as ax, buildLinkHeader as ay, buildMapUrl as az, type AuthResultEntry as b, parsePermissionsPolicy as b0, parseUserAgent as b1, parseVaryHeader as b2, parseXContentTypeOptionsHeader as b3, searchHeaders as b4, searchStatusCodes as b5, splitSitemap as b6, statusCodeToText as b7, typeNumberToLabel as b8, validateDomain as b9, validateHeaderName as ba, validateHeaderValue as bb, validateManifest as bc, validateRobotsTxt as bd, validateSitemap as be, type CacheControlDirective as c, type CacheControlOptions as d, type CacheControlResult as e, type ClientHintDef as f, type ClientHintValueType as g, type ClientHintsBuildResult as h, type ClientHintsParseResult as i, type ContentDispositionBuildOptions as j, type ContentDispositionBuildResult as k, type ContentDispositionParseResult as l, type ContentRangeResult as m, network as n, type ContentTypeRiskResult as o, type ContentTypeSniffRisk as p, type CookieAttributes as q, type CookieCheckResult as r, type DnsRecord as s, type DnsRecordType as t, type DnsResponse as u, type EmailHeaderField as v, type HarEntry as w, type HarParseResult as x, type HarSummary as y, type HeaderCategory as z };
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* - vary-header-builder: buildVaryHeader, parseVaryHeader
|
|
23
23
|
* - permissions-policy-builder: buildPermissionsPolicy, parsePermissionsPolicy
|
|
24
24
|
* - x-content-type-options-builder: buildXContentTypeOptionsHeader, parseXContentTypeOptionsHeader, assessContentTypeRisk
|
|
25
|
+
* - accept-language-parser: parseAcceptLanguage, buildAcceptLanguage
|
|
25
26
|
*/
|
|
26
27
|
declare const DNS_RECORD_TYPES: readonly ["A", "AAAA", "CNAME", "MX", "TXT", "NS", "SOA", "PTR", "SRV", "CAA"];
|
|
27
28
|
type DnsRecordType = typeof DNS_RECORD_TYPES[number];
|
|
@@ -743,7 +744,39 @@ interface ContentTypeRiskResult {
|
|
|
743
744
|
declare function assessContentTypeRisk(contentType: string): ContentTypeRiskResult | {
|
|
744
745
|
error: string;
|
|
745
746
|
};
|
|
747
|
+
interface AcceptLanguageEntry {
|
|
748
|
+
locale: string;
|
|
749
|
+
quality: number;
|
|
750
|
+
}
|
|
751
|
+
interface AcceptLanguageResult {
|
|
752
|
+
header: string;
|
|
753
|
+
headerValue: string;
|
|
754
|
+
entries: AcceptLanguageEntry[];
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Build an `Accept-Language` request-header value from a list of locale/
|
|
758
|
+
* quality pairs, sorting by descending quality (ties keep their original
|
|
759
|
+
* order) and omitting `;q=1` for the default weight, per RFC 9110 section
|
|
760
|
+
* 12.5.4.
|
|
761
|
+
*/
|
|
762
|
+
declare function buildAcceptLanguage(locales: {
|
|
763
|
+
locale: string;
|
|
764
|
+
quality?: number;
|
|
765
|
+
}[]): AcceptLanguageResult | {
|
|
766
|
+
error: string;
|
|
767
|
+
};
|
|
768
|
+
/**
|
|
769
|
+
* Parse an existing `Accept-Language` header value (with or without a
|
|
770
|
+
* leading `Accept-Language:` label) into its ranked locale/quality pairs,
|
|
771
|
+
* sorted by descending quality per RFC 9110 section 12.5.4 (a missing
|
|
772
|
+
* `;q=` defaults to 1).
|
|
773
|
+
*/
|
|
774
|
+
declare function parseAcceptLanguage(raw: string): AcceptLanguageResult | {
|
|
775
|
+
error: string;
|
|
776
|
+
};
|
|
746
777
|
|
|
778
|
+
type network_AcceptLanguageEntry = AcceptLanguageEntry;
|
|
779
|
+
type network_AcceptLanguageResult = AcceptLanguageResult;
|
|
747
780
|
type network_AuthResultEntry = AuthResultEntry;
|
|
748
781
|
type network_BuildRangeHeaderOptions = BuildRangeHeaderOptions;
|
|
749
782
|
declare const network_CLIENT_HINTS: typeof CLIENT_HINTS;
|
|
@@ -823,6 +856,7 @@ type network_XContentTypeOptionsParseResult = XContentTypeOptionsParseResult;
|
|
|
823
856
|
declare const network_X_CONTENT_TYPE_OPTIONS_HEADER: typeof X_CONTENT_TYPE_OPTIONS_HEADER;
|
|
824
857
|
declare const network_analyzeEmailHeaders: typeof analyzeEmailHeaders;
|
|
825
858
|
declare const network_assessContentTypeRisk: typeof assessContentTypeRisk;
|
|
859
|
+
declare const network_buildAcceptLanguage: typeof buildAcceptLanguage;
|
|
826
860
|
declare const network_buildCacheControl: typeof buildCacheControl;
|
|
827
861
|
declare const network_buildClientHints: typeof buildClientHints;
|
|
828
862
|
declare const network_buildContentDisposition: typeof buildContentDisposition;
|
|
@@ -850,6 +884,7 @@ declare const network_isSuccess: typeof isSuccess;
|
|
|
850
884
|
declare const network_isValidIp: typeof isValidIp;
|
|
851
885
|
declare const network_isValidIpv4: typeof isValidIpv4;
|
|
852
886
|
declare const network_isValidIpv6: typeof isValidIpv6;
|
|
887
|
+
declare const network_parseAcceptLanguage: typeof parseAcceptLanguage;
|
|
853
888
|
declare const network_parseClientHintHeaders: typeof parseClientHintHeaders;
|
|
854
889
|
declare const network_parseContentDisposition: typeof parseContentDisposition;
|
|
855
890
|
declare const network_parseContentRangeHeader: typeof parseContentRangeHeader;
|
|
@@ -873,7 +908,7 @@ declare const network_validateManifest: typeof validateManifest;
|
|
|
873
908
|
declare const network_validateRobotsTxt: typeof validateRobotsTxt;
|
|
874
909
|
declare const network_validateSitemap: typeof validateSitemap;
|
|
875
910
|
declare namespace network {
|
|
876
|
-
export { type network_AuthResultEntry as AuthResultEntry, type network_BuildRangeHeaderOptions as BuildRangeHeaderOptions, network_CLIENT_HINTS as CLIENT_HINTS, type network_CacheControlDirective as CacheControlDirective, type network_CacheControlOptions as CacheControlOptions, type network_CacheControlResult as CacheControlResult, type network_ClientHintDef as ClientHintDef, type network_ClientHintValueType as ClientHintValueType, type network_ClientHintsBuildResult as ClientHintsBuildResult, type network_ClientHintsParseResult as ClientHintsParseResult, type network_ContentDispositionBuildOptions as ContentDispositionBuildOptions, type network_ContentDispositionBuildResult as ContentDispositionBuildResult, type network_ContentDispositionParseResult as ContentDispositionParseResult, type network_ContentRangeResult as ContentRangeResult, type network_ContentTypeRiskResult as ContentTypeRiskResult, type network_ContentTypeSniffRisk as ContentTypeSniffRisk, type network_CookieAttributes as CookieAttributes, type network_CookieCheckResult as CookieCheckResult, network_DNS_RECORD_TYPES as DNS_RECORD_TYPES, type network_DnsRecord as DnsRecord, type network_DnsRecordType as DnsRecordType, type network_DnsResponse as DnsResponse, type network_EmailHeaderAnalysis as EmailHeaderAnalysis, type network_EmailHeaderField as EmailHeaderField, type network_GeoResult as GeoResult, network_HTTP_HEADERS as HTTP_HEADERS, type network_HarEntry as HarEntry, type network_HarParseResult as HarParseResult, type network_HarSummary as HarSummary, type network_HeaderCategory as HeaderCategory, type network_HttpHeader as HttpHeader, type network_Ipv6AddressType as Ipv6AddressType, type network_Ipv6ParseResult as Ipv6ParseResult, network_LINK_REL_VALUES as LINK_REL_VALUES, type network_LinkHeaderEntry as LinkHeaderEntry, type network_LinkHeaderEntryInput as LinkHeaderEntryInput, type network_LinkHeaderResult as LinkHeaderResult, type network_LinkRel as LinkRel, type network_ManifestIconInfo as ManifestIconInfo, type network_ManifestIssue as ManifestIssue, type network_ManifestValidationResult as ManifestValidationResult, network_PERMISSIONS_POLICY_FEATURES as PERMISSIONS_POLICY_FEATURES, type network_ParsedClientHint as ParsedClientHint, type network_ParsedDnsResult as ParsedDnsResult, type network_ParsedGeoResult as ParsedGeoResult, type network_PermissionsPolicyDirective as PermissionsPolicyDirective, type network_PermissionsPolicyFeatureInput as PermissionsPolicyFeatureInput, type network_PermissionsPolicyResult as PermissionsPolicyResult, network_REFERRER_POLICY_VALUES as REFERRER_POLICY_VALUES, type network_RangeEntry as RangeEntry, type network_RangeEntryInput as RangeEntryInput, type network_RangeHeaderResult as RangeHeaderResult, type network_ReceivedHop as ReceivedHop, type network_ReferrerPolicyEntry as ReferrerPolicyEntry, type network_ReferrerPolicyResult as ReferrerPolicyResult, type network_ReferrerPolicyValue as ReferrerPolicyValue, type network_RobotsGroup as RobotsGroup, type network_RobotsIssue as RobotsIssue, type network_RobotsRule as RobotsRule, type network_RobotsValidationResult as RobotsValidationResult, network_STATUS_CODES as STATUS_CODES, type network_SameSiteValue as SameSiteValue, type network_SitemapIndexEntry as SitemapIndexEntry, type network_SitemapIssue as SitemapIssue, type network_SitemapSplitFile as SitemapSplitFile, type network_SitemapUrlEntry as SitemapUrlEntry, type network_SitemapValidationResult as SitemapValidationResult, type network_SplitSitemapOptions as SplitSitemapOptions, type network_SplitSitemapResult as SplitSitemapResult, type network_StatusCode as StatusCode, type network_UaDeviceType as UaDeviceType, type network_UserAgentInfo as UserAgentInfo, type network_VaryHeaderEntry as VaryHeaderEntry, type network_VaryHeaderResult as VaryHeaderResult, type network_XContentTypeOptionsHeader as XContentTypeOptionsHeader, type network_XContentTypeOptionsParseResult as XContentTypeOptionsParseResult, network_X_CONTENT_TYPE_OPTIONS_HEADER as X_CONTENT_TYPE_OPTIONS_HEADER, network_analyzeEmailHeaders as analyzeEmailHeaders, network_assessContentTypeRisk as assessContentTypeRisk, network_buildCacheControl as buildCacheControl, network_buildClientHints as buildClientHints, network_buildContentDisposition as buildContentDisposition, network_buildDnsQueryUrl as buildDnsQueryUrl, network_buildGeoUrl as buildGeoUrl, network_buildLinkHeader as buildLinkHeader, network_buildMapUrl as buildMapUrl, network_buildPermissionsPolicy as buildPermissionsPolicy, network_buildRangeHeader as buildRangeHeader, network_buildReferrerPolicy as buildReferrerPolicy, network_buildVaryHeader as buildVaryHeader, network_buildXContentTypeOptionsHeader as buildXContentTypeOptionsHeader, network_checkSetCookieHeader as checkSetCookieHeader, network_countryCodeToFlag as countryCodeToFlag, network_formatCoordinates as formatCoordinates, network_formatTtl as formatTtl, network_getByCategory as getByCategory, network_getHeader as getHeader, network_getHeadersByCategory as getHeadersByCategory, network_getStatusByCategory as getStatusByCategory, network_getStatusCode as getStatusCode, network_isClientError as isClientError, network_isServerError as isServerError, network_isSuccess as isSuccess, network_isValidIp as isValidIp, network_isValidIpv4 as isValidIpv4, network_isValidIpv6 as isValidIpv6, network_parseClientHintHeaders as parseClientHintHeaders, network_parseContentDisposition as parseContentDisposition, network_parseContentRangeHeader as parseContentRangeHeader, network_parseDnsResponse as parseDnsResponse, network_parseGeoResponse as parseGeoResponse, network_parseHar as parseHar, network_parseIpv6Address as parseIpv6Address, network_parsePermissionsPolicy as parsePermissionsPolicy, network_parseUserAgent as parseUserAgent, network_parseVaryHeader as parseVaryHeader, network_parseXContentTypeOptionsHeader as parseXContentTypeOptionsHeader, network_searchHeaders as searchHeaders, network_searchStatusCodes as searchStatusCodes, network_splitSitemap as splitSitemap, network_statusCodeToText as statusCodeToText, network_typeNumberToLabel as typeNumberToLabel, network_validateDomain as validateDomain, network_validateHeaderName as validateHeaderName, network_validateHeaderValue as validateHeaderValue, network_validateManifest as validateManifest, network_validateRobotsTxt as validateRobotsTxt, network_validateSitemap as validateSitemap };
|
|
911
|
+
export { type network_AcceptLanguageEntry as AcceptLanguageEntry, type network_AcceptLanguageResult as AcceptLanguageResult, type network_AuthResultEntry as AuthResultEntry, type network_BuildRangeHeaderOptions as BuildRangeHeaderOptions, network_CLIENT_HINTS as CLIENT_HINTS, type network_CacheControlDirective as CacheControlDirective, type network_CacheControlOptions as CacheControlOptions, type network_CacheControlResult as CacheControlResult, type network_ClientHintDef as ClientHintDef, type network_ClientHintValueType as ClientHintValueType, type network_ClientHintsBuildResult as ClientHintsBuildResult, type network_ClientHintsParseResult as ClientHintsParseResult, type network_ContentDispositionBuildOptions as ContentDispositionBuildOptions, type network_ContentDispositionBuildResult as ContentDispositionBuildResult, type network_ContentDispositionParseResult as ContentDispositionParseResult, type network_ContentRangeResult as ContentRangeResult, type network_ContentTypeRiskResult as ContentTypeRiskResult, type network_ContentTypeSniffRisk as ContentTypeSniffRisk, type network_CookieAttributes as CookieAttributes, type network_CookieCheckResult as CookieCheckResult, network_DNS_RECORD_TYPES as DNS_RECORD_TYPES, type network_DnsRecord as DnsRecord, type network_DnsRecordType as DnsRecordType, type network_DnsResponse as DnsResponse, type network_EmailHeaderAnalysis as EmailHeaderAnalysis, type network_EmailHeaderField as EmailHeaderField, type network_GeoResult as GeoResult, network_HTTP_HEADERS as HTTP_HEADERS, type network_HarEntry as HarEntry, type network_HarParseResult as HarParseResult, type network_HarSummary as HarSummary, type network_HeaderCategory as HeaderCategory, type network_HttpHeader as HttpHeader, type network_Ipv6AddressType as Ipv6AddressType, type network_Ipv6ParseResult as Ipv6ParseResult, network_LINK_REL_VALUES as LINK_REL_VALUES, type network_LinkHeaderEntry as LinkHeaderEntry, type network_LinkHeaderEntryInput as LinkHeaderEntryInput, type network_LinkHeaderResult as LinkHeaderResult, type network_LinkRel as LinkRel, type network_ManifestIconInfo as ManifestIconInfo, type network_ManifestIssue as ManifestIssue, type network_ManifestValidationResult as ManifestValidationResult, network_PERMISSIONS_POLICY_FEATURES as PERMISSIONS_POLICY_FEATURES, type network_ParsedClientHint as ParsedClientHint, type network_ParsedDnsResult as ParsedDnsResult, type network_ParsedGeoResult as ParsedGeoResult, type network_PermissionsPolicyDirective as PermissionsPolicyDirective, type network_PermissionsPolicyFeatureInput as PermissionsPolicyFeatureInput, type network_PermissionsPolicyResult as PermissionsPolicyResult, network_REFERRER_POLICY_VALUES as REFERRER_POLICY_VALUES, type network_RangeEntry as RangeEntry, type network_RangeEntryInput as RangeEntryInput, type network_RangeHeaderResult as RangeHeaderResult, type network_ReceivedHop as ReceivedHop, type network_ReferrerPolicyEntry as ReferrerPolicyEntry, type network_ReferrerPolicyResult as ReferrerPolicyResult, type network_ReferrerPolicyValue as ReferrerPolicyValue, type network_RobotsGroup as RobotsGroup, type network_RobotsIssue as RobotsIssue, type network_RobotsRule as RobotsRule, type network_RobotsValidationResult as RobotsValidationResult, network_STATUS_CODES as STATUS_CODES, type network_SameSiteValue as SameSiteValue, type network_SitemapIndexEntry as SitemapIndexEntry, type network_SitemapIssue as SitemapIssue, type network_SitemapSplitFile as SitemapSplitFile, type network_SitemapUrlEntry as SitemapUrlEntry, type network_SitemapValidationResult as SitemapValidationResult, type network_SplitSitemapOptions as SplitSitemapOptions, type network_SplitSitemapResult as SplitSitemapResult, type network_StatusCode as StatusCode, type network_UaDeviceType as UaDeviceType, type network_UserAgentInfo as UserAgentInfo, type network_VaryHeaderEntry as VaryHeaderEntry, type network_VaryHeaderResult as VaryHeaderResult, type network_XContentTypeOptionsHeader as XContentTypeOptionsHeader, type network_XContentTypeOptionsParseResult as XContentTypeOptionsParseResult, network_X_CONTENT_TYPE_OPTIONS_HEADER as X_CONTENT_TYPE_OPTIONS_HEADER, network_analyzeEmailHeaders as analyzeEmailHeaders, network_assessContentTypeRisk as assessContentTypeRisk, network_buildAcceptLanguage as buildAcceptLanguage, network_buildCacheControl as buildCacheControl, network_buildClientHints as buildClientHints, network_buildContentDisposition as buildContentDisposition, network_buildDnsQueryUrl as buildDnsQueryUrl, network_buildGeoUrl as buildGeoUrl, network_buildLinkHeader as buildLinkHeader, network_buildMapUrl as buildMapUrl, network_buildPermissionsPolicy as buildPermissionsPolicy, network_buildRangeHeader as buildRangeHeader, network_buildReferrerPolicy as buildReferrerPolicy, network_buildVaryHeader as buildVaryHeader, network_buildXContentTypeOptionsHeader as buildXContentTypeOptionsHeader, network_checkSetCookieHeader as checkSetCookieHeader, network_countryCodeToFlag as countryCodeToFlag, network_formatCoordinates as formatCoordinates, network_formatTtl as formatTtl, network_getByCategory as getByCategory, network_getHeader as getHeader, network_getHeadersByCategory as getHeadersByCategory, network_getStatusByCategory as getStatusByCategory, network_getStatusCode as getStatusCode, network_isClientError as isClientError, network_isServerError as isServerError, network_isSuccess as isSuccess, network_isValidIp as isValidIp, network_isValidIpv4 as isValidIpv4, network_isValidIpv6 as isValidIpv6, network_parseAcceptLanguage as parseAcceptLanguage, network_parseClientHintHeaders as parseClientHintHeaders, network_parseContentDisposition as parseContentDisposition, network_parseContentRangeHeader as parseContentRangeHeader, network_parseDnsResponse as parseDnsResponse, network_parseGeoResponse as parseGeoResponse, network_parseHar as parseHar, network_parseIpv6Address as parseIpv6Address, network_parsePermissionsPolicy as parsePermissionsPolicy, network_parseUserAgent as parseUserAgent, network_parseVaryHeader as parseVaryHeader, network_parseXContentTypeOptionsHeader as parseXContentTypeOptionsHeader, network_searchHeaders as searchHeaders, network_searchStatusCodes as searchStatusCodes, network_splitSitemap as splitSitemap, network_statusCodeToText as statusCodeToText, network_typeNumberToLabel as typeNumberToLabel, network_validateDomain as validateDomain, network_validateHeaderName as validateHeaderName, network_validateHeaderValue as validateHeaderValue, network_validateManifest as validateManifest, network_validateRobotsTxt as validateRobotsTxt, network_validateSitemap as validateSitemap };
|
|
877
912
|
}
|
|
878
913
|
|
|
879
|
-
export { type
|
|
914
|
+
export { type RangeEntryInput as $, type AcceptLanguageEntry as A, type BuildRangeHeaderOptions as B, CLIENT_HINTS as C, DNS_RECORD_TYPES as D, type EmailHeaderAnalysis as E, type HttpHeader as F, type GeoResult as G, HTTP_HEADERS as H, type Ipv6AddressType as I, type Ipv6ParseResult as J, type LinkHeaderEntry as K, LINK_REL_VALUES as L, type LinkHeaderEntryInput as M, type LinkHeaderResult as N, type LinkRel as O, type ManifestIconInfo as P, type ManifestIssue as Q, type ManifestValidationResult as R, PERMISSIONS_POLICY_FEATURES as S, type ParsedClientHint as T, type ParsedDnsResult as U, type ParsedGeoResult as V, type PermissionsPolicyDirective as W, type PermissionsPolicyFeatureInput as X, type PermissionsPolicyResult as Y, REFERRER_POLICY_VALUES as Z, type RangeEntry as _, type AcceptLanguageResult as a, parseIpv6Address as a$, type RangeHeaderResult as a0, type ReceivedHop as a1, type ReferrerPolicyEntry as a2, type ReferrerPolicyResult as a3, type ReferrerPolicyValue as a4, type RobotsGroup as a5, type RobotsIssue as a6, type RobotsRule as a7, type RobotsValidationResult as a8, STATUS_CODES as a9, buildPermissionsPolicy as aA, buildRangeHeader as aB, buildReferrerPolicy as aC, buildVaryHeader as aD, buildXContentTypeOptionsHeader as aE, checkSetCookieHeader as aF, countryCodeToFlag as aG, formatCoordinates as aH, formatTtl as aI, getByCategory as aJ, getHeader as aK, getHeadersByCategory as aL, getStatusByCategory as aM, getStatusCode as aN, isClientError as aO, isServerError as aP, isSuccess as aQ, isValidIp as aR, isValidIpv4 as aS, isValidIpv6 as aT, parseAcceptLanguage as aU, parseClientHintHeaders as aV, parseContentDisposition as aW, parseContentRangeHeader as aX, parseDnsResponse as aY, parseGeoResponse as aZ, parseHar as a_, type SameSiteValue as aa, type SitemapIndexEntry as ab, type SitemapIssue as ac, type SitemapSplitFile as ad, type SitemapUrlEntry as ae, type SitemapValidationResult as af, type SplitSitemapOptions as ag, type SplitSitemapResult as ah, type StatusCode as ai, type UaDeviceType as aj, type UserAgentInfo as ak, type VaryHeaderEntry as al, type VaryHeaderResult as am, type XContentTypeOptionsHeader as an, type XContentTypeOptionsParseResult as ao, X_CONTENT_TYPE_OPTIONS_HEADER as ap, analyzeEmailHeaders as aq, assessContentTypeRisk as ar, buildAcceptLanguage as as, buildCacheControl as at, buildClientHints as au, buildContentDisposition as av, buildDnsQueryUrl as aw, buildGeoUrl as ax, buildLinkHeader as ay, buildMapUrl as az, type AuthResultEntry as b, parsePermissionsPolicy as b0, parseUserAgent as b1, parseVaryHeader as b2, parseXContentTypeOptionsHeader as b3, searchHeaders as b4, searchStatusCodes as b5, splitSitemap as b6, statusCodeToText as b7, typeNumberToLabel as b8, validateDomain as b9, validateHeaderName as ba, validateHeaderValue as bb, validateManifest as bc, validateRobotsTxt as bd, validateSitemap as be, type CacheControlDirective as c, type CacheControlOptions as d, type CacheControlResult as e, type ClientHintDef as f, type ClientHintValueType as g, type ClientHintsBuildResult as h, type ClientHintsParseResult as i, type ContentDispositionBuildOptions as j, type ContentDispositionBuildResult as k, type ContentDispositionParseResult as l, type ContentRangeResult as m, network as n, type ContentTypeRiskResult as o, type ContentTypeSniffRisk as p, type CookieAttributes as q, type CookieCheckResult as r, type DnsRecord as s, type DnsRecordType as t, type DnsResponse as u, type EmailHeaderField as v, type HarEntry as w, type HarParseResult as x, type HarSummary as y, type HeaderCategory as z };
|
package/dist/tools/data.cjs
CHANGED
|
@@ -1578,6 +1578,59 @@ function findCsvDuplicateRows(input, options) {
|
|
|
1578
1578
|
uniqueRowCount: parsed.rows.length - duplicateRowCount + duplicateGroups.length
|
|
1579
1579
|
};
|
|
1580
1580
|
}
|
|
1581
|
+
var _ISO_DATE_RE = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})?)?$/;
|
|
1582
|
+
function _classifyCsvValue(raw) {
|
|
1583
|
+
const v = raw.trim();
|
|
1584
|
+
if (v === "") return "empty";
|
|
1585
|
+
if (/^(true|false)$/i.test(v)) return "boolean";
|
|
1586
|
+
if (/^-?\d+$/.test(v)) return "integer";
|
|
1587
|
+
if (/^-?\d+\.\d+$/.test(v)) return "float";
|
|
1588
|
+
if (_ISO_DATE_RE.test(v)) return "date";
|
|
1589
|
+
return "string";
|
|
1590
|
+
}
|
|
1591
|
+
function inferCsvColumnTypes(input, options) {
|
|
1592
|
+
const parsed = parseCsv(input, {
|
|
1593
|
+
delimiter: options?.delimiter ?? ",",
|
|
1594
|
+
hasHeader: options?.hasHeader !== false
|
|
1595
|
+
});
|
|
1596
|
+
if ("error" in parsed) return parsed;
|
|
1597
|
+
const columns = parsed.headers.map((name, colIdx) => {
|
|
1598
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1599
|
+
let sawString = false;
|
|
1600
|
+
let nullCount = 0;
|
|
1601
|
+
const sampleValues = [];
|
|
1602
|
+
for (const row of parsed.rows) {
|
|
1603
|
+
const raw = row[colIdx] ?? "";
|
|
1604
|
+
const kind = _classifyCsvValue(raw);
|
|
1605
|
+
if (kind === "empty") {
|
|
1606
|
+
nullCount++;
|
|
1607
|
+
continue;
|
|
1608
|
+
}
|
|
1609
|
+
if (sampleValues.length < 3) sampleValues.push(raw);
|
|
1610
|
+
if (kind === "string") sawString = true;
|
|
1611
|
+
else seen.add(kind);
|
|
1612
|
+
}
|
|
1613
|
+
let inferredType;
|
|
1614
|
+
if (sawString || seen.size === 0) {
|
|
1615
|
+
inferredType = "string";
|
|
1616
|
+
} else if (seen.size === 1) {
|
|
1617
|
+
inferredType = [...seen][0];
|
|
1618
|
+
} else if (seen.has("integer") && seen.has("float") && seen.size === 2) {
|
|
1619
|
+
inferredType = "float";
|
|
1620
|
+
} else {
|
|
1621
|
+
inferredType = "string";
|
|
1622
|
+
}
|
|
1623
|
+
return {
|
|
1624
|
+
name,
|
|
1625
|
+
inferredType,
|
|
1626
|
+
nullable: nullCount > 0,
|
|
1627
|
+
nullCount,
|
|
1628
|
+
totalCount: parsed.rows.length,
|
|
1629
|
+
sampleValues
|
|
1630
|
+
};
|
|
1631
|
+
});
|
|
1632
|
+
return { columns, rowCount: parsed.rows.length };
|
|
1633
|
+
}
|
|
1581
1634
|
var _YAML_ANCHOR_RE = /(?:^|\s)&([A-Za-z0-9_.-]+)/g;
|
|
1582
1635
|
var _YAML_ALIAS_RE = /(?:^|\s)\*([A-Za-z0-9_.-]+)/g;
|
|
1583
1636
|
function _stripYamlLineComment(line) {
|
|
@@ -1710,6 +1763,7 @@ exports.getSectionNames = getSectionNames;
|
|
|
1710
1763
|
exports.getTomlStats = getTomlStats;
|
|
1711
1764
|
exports.getXmlStats = getXmlStats;
|
|
1712
1765
|
exports.getYamlStats = getYamlStats;
|
|
1766
|
+
exports.inferCsvColumnTypes = inferCsvColumnTypes;
|
|
1713
1767
|
exports.iniToJson = iniToJson;
|
|
1714
1768
|
exports.jsonArrayToNdjson = jsonArrayToNdjson;
|
|
1715
1769
|
exports.jsonToIni = jsonToIni;
|
package/dist/tools/data.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as CaptionSpeedCue, a as CaptionSpeedResult, b as ConvertedSubtitles, c as
|
|
1
|
+
export { C as CaptionSpeedCue, a as CaptionSpeedResult, b as ConvertedSubtitles, c as CsvColumnType, e as CsvColumnTypeInfo, f as CsvColumnTypeOptions, g as CsvColumnTypeResult, h as CsvDuplicateGroup, i as CsvDuplicateOptions, j as CsvDuplicateResult, k as CsvParseResult, l as CsvToSqlOptions, m as CsvToSqlResult, E as EnvDiffError, n as EnvDiffResult, o as EnvEntry, p as EnvParseResult, F as FrontMatterError, q as FrontMatterResult, I as IniSection, M as MarkdownTaskListItem, r as MarkdownTaskListProgressResult, s as MarkdownTaskListSectionSummary, t as MarkdownTocEntry, u as MarkdownTocOptions, v as MarkdownTocResult, N as NdjsonLineResult, w as NdjsonValidateResult, P as ParseOptions, x as ParsedIni, y as ParsedSubtitles, S as SubtitleCue, z as SubtitleFormat, T as TomlFormatResult, V as ValidationResult, X as XmlFormatResult, A as XmlToJsonOptions, Y as YamlAnchorInfo, B as YamlAnchorResolveError, D as YamlAnchorResolveResult, G as analyzeCaptionSpeed, H as calculateMarkdownTaskListProgress, J as convertSubtitles, K as csvToJson, L as csvToSqlInsert, O as detectDelimiter, Q as detectSubtitleFormat, R as diffEnvExample, U as envToExport, W as envToJson, Z as findCsvDuplicateRows, _ as formatNdjson, $ as formatSubtitleTimestamp, a0 as formatToml, a1 as formatXml, a2 as generateMarkdownToc, a3 as getSection, a4 as getSectionNames, a5 as getTomlStats, a6 as getXmlStats, a7 as getYamlStats, a8 as inferCsvColumnTypes, a9 as iniToJson, aa as jsonArrayToNdjson, ab as jsonToIni, ac as jsonToToml, ad as jsonToXml, ae as minifyNdjson, af as minifyToml, ag as minifyXml, ah as ndjsonToJsonArray, ai as parseCsv, aj as parseEnv, ak as parseFrontMatter, al as parseIni, am as parseSubtitleTimestamp, an as parseSubtitles, ao as parseXmlToObject, ap as resolveYamlAnchors, aq as serializeSubtitles, ar as shiftSubtitles, as as stringifyIni, at as toCsvString, au as tomlToJson, av as validateEnvKey, aw as validateIni, ax as validateNdjson, ay as validateToml, az as validateXml, aA as validateYaml, aB as xmlToJson } from '../data-Cvyg8ZXo.cjs';
|
package/dist/tools/data.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as CaptionSpeedCue, a as CaptionSpeedResult, b as ConvertedSubtitles, c as
|
|
1
|
+
export { C as CaptionSpeedCue, a as CaptionSpeedResult, b as ConvertedSubtitles, c as CsvColumnType, e as CsvColumnTypeInfo, f as CsvColumnTypeOptions, g as CsvColumnTypeResult, h as CsvDuplicateGroup, i as CsvDuplicateOptions, j as CsvDuplicateResult, k as CsvParseResult, l as CsvToSqlOptions, m as CsvToSqlResult, E as EnvDiffError, n as EnvDiffResult, o as EnvEntry, p as EnvParseResult, F as FrontMatterError, q as FrontMatterResult, I as IniSection, M as MarkdownTaskListItem, r as MarkdownTaskListProgressResult, s as MarkdownTaskListSectionSummary, t as MarkdownTocEntry, u as MarkdownTocOptions, v as MarkdownTocResult, N as NdjsonLineResult, w as NdjsonValidateResult, P as ParseOptions, x as ParsedIni, y as ParsedSubtitles, S as SubtitleCue, z as SubtitleFormat, T as TomlFormatResult, V as ValidationResult, X as XmlFormatResult, A as XmlToJsonOptions, Y as YamlAnchorInfo, B as YamlAnchorResolveError, D as YamlAnchorResolveResult, G as analyzeCaptionSpeed, H as calculateMarkdownTaskListProgress, J as convertSubtitles, K as csvToJson, L as csvToSqlInsert, O as detectDelimiter, Q as detectSubtitleFormat, R as diffEnvExample, U as envToExport, W as envToJson, Z as findCsvDuplicateRows, _ as formatNdjson, $ as formatSubtitleTimestamp, a0 as formatToml, a1 as formatXml, a2 as generateMarkdownToc, a3 as getSection, a4 as getSectionNames, a5 as getTomlStats, a6 as getXmlStats, a7 as getYamlStats, a8 as inferCsvColumnTypes, a9 as iniToJson, aa as jsonArrayToNdjson, ab as jsonToIni, ac as jsonToToml, ad as jsonToXml, ae as minifyNdjson, af as minifyToml, ag as minifyXml, ah as ndjsonToJsonArray, ai as parseCsv, aj as parseEnv, ak as parseFrontMatter, al as parseIni, am as parseSubtitleTimestamp, an as parseSubtitles, ao as parseXmlToObject, ap as resolveYamlAnchors, aq as serializeSubtitles, ar as shiftSubtitles, as as stringifyIni, at as toCsvString, au as tomlToJson, av as validateEnvKey, aw as validateIni, ax as validateNdjson, ay as validateToml, az as validateXml, aA as validateYaml, aB as xmlToJson } from '../data-Cvyg8ZXo.js';
|
package/dist/tools/data.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { analyzeCaptionSpeed, calculateMarkdownTaskListProgress, convertSubtitles, csvToJson, csvToSqlInsert, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, findCsvDuplicateRows, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, resolveYamlAnchors, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson } from '../chunk-
|
|
1
|
+
export { analyzeCaptionSpeed, calculateMarkdownTaskListProgress, convertSubtitles, csvToJson, csvToSqlInsert, 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 } from '../chunk-56VFNHVO.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|