@utilix-tech/sdk 0.44.0 → 0.46.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 +26 -6
- package/dist/{chunk-GZBSKZ6F.js → chunk-7PEKYLRB.js} +104 -1
- package/dist/{chunk-WT3Q5LCN.js → chunk-KMQHBUYO.js} +94 -1
- package/dist/{chunk-F2CEN226.js → chunk-P7TXG7CI.js} +127 -1
- package/dist/index.cjs +322 -0
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/{network-BlOVDE3Y.d.ts → network-Bzm1tjMA.d.cts} +60 -2
- package/dist/{network-BlOVDE3Y.d.cts → network-Bzm1tjMA.d.ts} +60 -2
- package/dist/{text-kHkT9VtT.d.cts → text-DWUcY8H1.d.cts} +34 -2
- package/dist/{text-kHkT9VtT.d.ts → text-DWUcY8H1.d.ts} +34 -2
- package/dist/tools/network.cjs +103 -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/text.cjs +126 -0
- package/dist/tools/text.d.cts +1 -1
- package/dist/tools/text.d.ts +1 -1
- package/dist/tools/text.js +1 -1
- package/dist/tools/units.cjs +93 -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-WAgBQ7D7.d.cts → units-DU4Pisfx.d.cts} +63 -2
- package/dist/{units-WAgBQ7D7.d.ts → units-DU4Pisfx.d.ts} +63 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2063,6 +2063,7 @@ __export(text_exports, {
|
|
|
2063
2063
|
LINE_OPS: () => LINE_OPS,
|
|
2064
2064
|
MORSE_CODE: () => MORSE_CODE,
|
|
2065
2065
|
addBorder: () => addBorder,
|
|
2066
|
+
analyzeKeywordDensity: () => analyzeKeywordDensity,
|
|
2066
2067
|
analyzeSentenceLengths: () => analyzeSentenceLengths,
|
|
2067
2068
|
analyzeText: () => analyzeText,
|
|
2068
2069
|
applyOp: () => applyOp,
|
|
@@ -4722,6 +4723,131 @@ function analyzeSentenceLengths(text) {
|
|
|
4722
4723
|
buckets
|
|
4723
4724
|
};
|
|
4724
4725
|
}
|
|
4726
|
+
var KEYWORD_DENSITY_STOPWORDS = /* @__PURE__ */ new Set([
|
|
4727
|
+
"a",
|
|
4728
|
+
"an",
|
|
4729
|
+
"the",
|
|
4730
|
+
"and",
|
|
4731
|
+
"or",
|
|
4732
|
+
"but",
|
|
4733
|
+
"if",
|
|
4734
|
+
"then",
|
|
4735
|
+
"else",
|
|
4736
|
+
"for",
|
|
4737
|
+
"nor",
|
|
4738
|
+
"so",
|
|
4739
|
+
"yet",
|
|
4740
|
+
"of",
|
|
4741
|
+
"in",
|
|
4742
|
+
"on",
|
|
4743
|
+
"at",
|
|
4744
|
+
"to",
|
|
4745
|
+
"from",
|
|
4746
|
+
"by",
|
|
4747
|
+
"with",
|
|
4748
|
+
"about",
|
|
4749
|
+
"against",
|
|
4750
|
+
"between",
|
|
4751
|
+
"into",
|
|
4752
|
+
"through",
|
|
4753
|
+
"during",
|
|
4754
|
+
"before",
|
|
4755
|
+
"after",
|
|
4756
|
+
"above",
|
|
4757
|
+
"below",
|
|
4758
|
+
"up",
|
|
4759
|
+
"down",
|
|
4760
|
+
"out",
|
|
4761
|
+
"off",
|
|
4762
|
+
"over",
|
|
4763
|
+
"under",
|
|
4764
|
+
"again",
|
|
4765
|
+
"further",
|
|
4766
|
+
"once",
|
|
4767
|
+
"is",
|
|
4768
|
+
"are",
|
|
4769
|
+
"was",
|
|
4770
|
+
"were",
|
|
4771
|
+
"be",
|
|
4772
|
+
"been",
|
|
4773
|
+
"being",
|
|
4774
|
+
"am",
|
|
4775
|
+
"do",
|
|
4776
|
+
"does",
|
|
4777
|
+
"did",
|
|
4778
|
+
"doing",
|
|
4779
|
+
"have",
|
|
4780
|
+
"has",
|
|
4781
|
+
"had",
|
|
4782
|
+
"having",
|
|
4783
|
+
"i",
|
|
4784
|
+
"me",
|
|
4785
|
+
"my",
|
|
4786
|
+
"we",
|
|
4787
|
+
"our",
|
|
4788
|
+
"you",
|
|
4789
|
+
"your",
|
|
4790
|
+
"he",
|
|
4791
|
+
"him",
|
|
4792
|
+
"his",
|
|
4793
|
+
"she",
|
|
4794
|
+
"her",
|
|
4795
|
+
"it",
|
|
4796
|
+
"its",
|
|
4797
|
+
"they",
|
|
4798
|
+
"them",
|
|
4799
|
+
"their",
|
|
4800
|
+
"this",
|
|
4801
|
+
"that",
|
|
4802
|
+
"these",
|
|
4803
|
+
"those",
|
|
4804
|
+
"as",
|
|
4805
|
+
"not",
|
|
4806
|
+
"no",
|
|
4807
|
+
"can",
|
|
4808
|
+
"will",
|
|
4809
|
+
"just",
|
|
4810
|
+
"than",
|
|
4811
|
+
"too",
|
|
4812
|
+
"very",
|
|
4813
|
+
"would",
|
|
4814
|
+
"should",
|
|
4815
|
+
"could",
|
|
4816
|
+
"there",
|
|
4817
|
+
"here",
|
|
4818
|
+
"what",
|
|
4819
|
+
"which",
|
|
4820
|
+
"who",
|
|
4821
|
+
"whom"
|
|
4822
|
+
]);
|
|
4823
|
+
function analyzeKeywordDensity(text, options = {}) {
|
|
4824
|
+
if (!text || !text.trim()) return { error: "Input text is empty" };
|
|
4825
|
+
const topN = options.topN ?? 10;
|
|
4826
|
+
const minWordLength = options.minWordLength ?? 3;
|
|
4827
|
+
const ngramSize = options.ngramSize ?? 1;
|
|
4828
|
+
if (!Number.isInteger(topN) || topN <= 0) return { error: "topN must be a positive whole number" };
|
|
4829
|
+
if (!Number.isInteger(minWordLength) || minWordLength < 1) return { error: "minWordLength must be a positive whole number" };
|
|
4830
|
+
if (!Number.isInteger(ngramSize) || ngramSize < 1 || ngramSize > 3) return { error: "ngramSize must be 1, 2, or 3" };
|
|
4831
|
+
const tokens = text.toLowerCase().match(/[a-z0-9']+/g) ?? [];
|
|
4832
|
+
const totalWords = tokens.length;
|
|
4833
|
+
if (totalWords === 0) return { error: "No words found in input text" };
|
|
4834
|
+
if (totalWords < ngramSize) return { error: "Input text has fewer words than the requested phrase length" };
|
|
4835
|
+
const counts = /* @__PURE__ */ new Map();
|
|
4836
|
+
for (let i = 0; i <= tokens.length - ngramSize; i++) {
|
|
4837
|
+
const phraseWords = tokens.slice(i, i + ngramSize);
|
|
4838
|
+
if (phraseWords.some((w) => w.length < minWordLength)) continue;
|
|
4839
|
+
if (ngramSize === 1 && KEYWORD_DENSITY_STOPWORDS.has(phraseWords[0])) continue;
|
|
4840
|
+
const phrase = phraseWords.join(" ");
|
|
4841
|
+
counts.set(phrase, (counts.get(phrase) ?? 0) + 1);
|
|
4842
|
+
}
|
|
4843
|
+
const keywords = Array.from(counts.entries()).map(([keyword, count]) => ({ keyword, count, density: Math.round(count / totalWords * 1e3) / 10 })).sort((a, b) => b.count - a.count || a.keyword.localeCompare(b.keyword)).slice(0, topN);
|
|
4844
|
+
return {
|
|
4845
|
+
totalWords,
|
|
4846
|
+
uniqueKeywords: counts.size,
|
|
4847
|
+
ngramSize,
|
|
4848
|
+
keywords
|
|
4849
|
+
};
|
|
4850
|
+
}
|
|
4725
4851
|
var EMOJI_TABLE = [
|
|
4726
4852
|
{ emoji: "\u{1F600}", name: "grinning face", shortcode: "grinning", codepoint: "U+1F600", category: "Smileys & Emotion", keywords: ["happy", "smile"] },
|
|
4727
4853
|
{ emoji: "\u{1F603}", name: "grinning face with big eyes", shortcode: "smiley", codepoint: "U+1F603", category: "Smileys & Emotion", keywords: ["happy", "joy"] },
|
|
@@ -7999,8 +8125,10 @@ __export(units_exports, {
|
|
|
7999
8125
|
calcSubnet: () => calcSubnet,
|
|
8000
8126
|
calculateBreakEven: () => calculateBreakEven,
|
|
8001
8127
|
calculateCashBreakdown: () => calculateCashBreakdown,
|
|
8128
|
+
calculateCdMaturity: () => calculateCdMaturity,
|
|
8002
8129
|
calculateChange: () => calculateChange,
|
|
8003
8130
|
calculateCompoundInterest: () => calculateCompoundInterest,
|
|
8131
|
+
calculateDepreciationSchedule: () => calculateDepreciationSchedule,
|
|
8004
8132
|
calculateDiscount: () => calculateDiscount,
|
|
8005
8133
|
calculateEmi: () => calculateEmi,
|
|
8006
8134
|
calculateLoan: () => calculateLoan,
|
|
@@ -9960,10 +10088,102 @@ function calculatePaybackPeriod(input) {
|
|
|
9960
10088
|
}
|
|
9961
10089
|
return result;
|
|
9962
10090
|
}
|
|
10091
|
+
function calculateCdMaturity(principal, annualRatePercent, termMonths, compoundsPerYear, earlyWithdrawalPenaltyMonths) {
|
|
10092
|
+
if (!Number.isFinite(principal) || principal <= 0) return { error: "Principal must be a finite number greater than zero" };
|
|
10093
|
+
if (!Number.isFinite(annualRatePercent) || annualRatePercent < 0) {
|
|
10094
|
+
return { error: "Annual interest rate must be zero or a positive number" };
|
|
10095
|
+
}
|
|
10096
|
+
if (!Number.isFinite(termMonths) || termMonths <= 0) return { error: "Term must be a positive number of months" };
|
|
10097
|
+
if (!Number.isInteger(compoundsPerYear) || compoundsPerYear <= 0) {
|
|
10098
|
+
return { error: "Compounding frequency must be a positive whole number of periods per year" };
|
|
10099
|
+
}
|
|
10100
|
+
if (earlyWithdrawalPenaltyMonths !== void 0 && (!Number.isFinite(earlyWithdrawalPenaltyMonths) || earlyWithdrawalPenaltyMonths < 0)) {
|
|
10101
|
+
return { error: "earlyWithdrawalPenaltyMonths must be zero or a positive number when provided" };
|
|
10102
|
+
}
|
|
10103
|
+
const round23 = (n) => Math.round(n * 100) / 100;
|
|
10104
|
+
const round4 = (n) => Math.round(n * 1e4) / 1e4;
|
|
10105
|
+
const ratePerPeriod = annualRatePercent / 100 / compoundsPerYear;
|
|
10106
|
+
const totalPeriods = compoundsPerYear * (termMonths / 12);
|
|
10107
|
+
const growth = ratePerPeriod === 0 ? 1 : Math.pow(1 + ratePerPeriod, totalPeriods);
|
|
10108
|
+
const maturityValue = principal * growth;
|
|
10109
|
+
const totalInterest = maturityValue - principal;
|
|
10110
|
+
const apy = ratePerPeriod === 0 ? 0 : (Math.pow(1 + ratePerPeriod, compoundsPerYear) - 1) * 100;
|
|
10111
|
+
const result = {
|
|
10112
|
+
principal: round23(principal),
|
|
10113
|
+
annualRatePercent: round4(annualRatePercent),
|
|
10114
|
+
termMonths,
|
|
10115
|
+
compoundsPerYear,
|
|
10116
|
+
maturityValue: round23(maturityValue),
|
|
10117
|
+
totalInterest: round23(totalInterest),
|
|
10118
|
+
apy: round4(apy)
|
|
10119
|
+
};
|
|
10120
|
+
if (earlyWithdrawalPenaltyMonths !== void 0) {
|
|
10121
|
+
const monthlyRate = annualRatePercent / 100 / 12;
|
|
10122
|
+
const forfeited = Math.min(principal * monthlyRate * earlyWithdrawalPenaltyMonths, Math.max(totalInterest, 0));
|
|
10123
|
+
result.earlyWithdrawalPenaltyMonths = earlyWithdrawalPenaltyMonths;
|
|
10124
|
+
result.earlyWithdrawalForfeitedInterest = round23(forfeited);
|
|
10125
|
+
result.earlyWithdrawalPayout = round23(maturityValue - forfeited);
|
|
10126
|
+
}
|
|
10127
|
+
return result;
|
|
10128
|
+
}
|
|
10129
|
+
var DEPRECIATION_METHODS = ["straight-line", "double-declining-balance", "sum-of-years-digits"];
|
|
10130
|
+
function calculateDepreciationSchedule(cost, salvageValue, usefulLifeYears, method) {
|
|
10131
|
+
if (!Number.isFinite(cost) || cost <= 0) return { error: "Cost must be a positive number" };
|
|
10132
|
+
if (!Number.isFinite(salvageValue) || salvageValue < 0) {
|
|
10133
|
+
return { error: "Salvage value must be zero or a positive number" };
|
|
10134
|
+
}
|
|
10135
|
+
if (salvageValue >= cost) return { error: "Salvage value must be less than cost" };
|
|
10136
|
+
if (!Number.isInteger(usefulLifeYears) || usefulLifeYears <= 0) {
|
|
10137
|
+
return { error: "Useful life must be a positive whole number of years" };
|
|
10138
|
+
}
|
|
10139
|
+
if (!DEPRECIATION_METHODS.includes(method)) {
|
|
10140
|
+
return { error: `Method must be one of: ${DEPRECIATION_METHODS.join(", ")}` };
|
|
10141
|
+
}
|
|
10142
|
+
const round23 = (n) => Math.round(n * 100) / 100;
|
|
10143
|
+
const depreciableBase = round23(cost - salvageValue);
|
|
10144
|
+
const schedule = [];
|
|
10145
|
+
let accumulated = 0;
|
|
10146
|
+
if (method === "straight-line") {
|
|
10147
|
+
const annual = round23(depreciableBase / usefulLifeYears);
|
|
10148
|
+
for (let year = 1; year <= usefulLifeYears; year++) {
|
|
10149
|
+
const expense = year === usefulLifeYears ? round23(depreciableBase - accumulated) : annual;
|
|
10150
|
+
accumulated = round23(accumulated + expense);
|
|
10151
|
+
schedule.push({ year, depreciationExpense: expense, accumulatedDepreciation: accumulated, bookValue: round23(cost - accumulated) });
|
|
10152
|
+
}
|
|
10153
|
+
} else if (method === "double-declining-balance") {
|
|
10154
|
+
const rate = 2 / usefulLifeYears;
|
|
10155
|
+
let bookValue = cost;
|
|
10156
|
+
for (let year = 1; year <= usefulLifeYears; year++) {
|
|
10157
|
+
let expense = round23(bookValue * rate);
|
|
10158
|
+
if (bookValue - expense < salvageValue) expense = round23(bookValue - salvageValue);
|
|
10159
|
+
if (expense < 0) expense = 0;
|
|
10160
|
+
bookValue = round23(bookValue - expense);
|
|
10161
|
+
accumulated = round23(accumulated + expense);
|
|
10162
|
+
schedule.push({ year, depreciationExpense: expense, accumulatedDepreciation: accumulated, bookValue });
|
|
10163
|
+
}
|
|
10164
|
+
} else {
|
|
10165
|
+
const sumOfYears = usefulLifeYears * (usefulLifeYears + 1) / 2;
|
|
10166
|
+
for (let year = 1; year <= usefulLifeYears; year++) {
|
|
10167
|
+
const fraction = (usefulLifeYears - year + 1) / sumOfYears;
|
|
10168
|
+
const expense = year === usefulLifeYears ? round23(depreciableBase - accumulated) : round23(fraction * depreciableBase);
|
|
10169
|
+
accumulated = round23(accumulated + expense);
|
|
10170
|
+
schedule.push({ year, depreciationExpense: expense, accumulatedDepreciation: accumulated, bookValue: round23(cost - accumulated) });
|
|
10171
|
+
}
|
|
10172
|
+
}
|
|
10173
|
+
return {
|
|
10174
|
+
cost,
|
|
10175
|
+
salvageValue,
|
|
10176
|
+
usefulLifeYears,
|
|
10177
|
+
method,
|
|
10178
|
+
totalDepreciation: accumulated,
|
|
10179
|
+
schedule
|
|
10180
|
+
};
|
|
10181
|
+
}
|
|
9963
10182
|
|
|
9964
10183
|
// src/tools/network.ts
|
|
9965
10184
|
var network_exports = {};
|
|
9966
10185
|
__export(network_exports, {
|
|
10186
|
+
CLIENT_HINTS: () => CLIENT_HINTS,
|
|
9967
10187
|
DNS_RECORD_TYPES: () => DNS_RECORD_TYPES,
|
|
9968
10188
|
HTTP_HEADERS: () => HTTP_HEADERS,
|
|
9969
10189
|
LINK_REL_VALUES: () => LINK_REL_VALUES,
|
|
@@ -9972,6 +10192,7 @@ __export(network_exports, {
|
|
|
9972
10192
|
STATUS_CODES: () => STATUS_CODES,
|
|
9973
10193
|
analyzeEmailHeaders: () => analyzeEmailHeaders,
|
|
9974
10194
|
buildCacheControl: () => buildCacheControl,
|
|
10195
|
+
buildClientHints: () => buildClientHints,
|
|
9975
10196
|
buildDnsQueryUrl: () => buildDnsQueryUrl,
|
|
9976
10197
|
buildGeoUrl: () => buildGeoUrl,
|
|
9977
10198
|
buildLinkHeader: () => buildLinkHeader,
|
|
@@ -9995,6 +10216,7 @@ __export(network_exports, {
|
|
|
9995
10216
|
isValidIp: () => isValidIp2,
|
|
9996
10217
|
isValidIpv4: () => isValidIpv42,
|
|
9997
10218
|
isValidIpv6: () => isValidIpv6,
|
|
10219
|
+
parseClientHintHeaders: () => parseClientHintHeaders,
|
|
9998
10220
|
parseContentRangeHeader: () => parseContentRangeHeader,
|
|
9999
10221
|
parseDnsResponse: () => parseDnsResponse,
|
|
10000
10222
|
parseGeoResponse: () => parseGeoResponse,
|
|
@@ -12536,6 +12758,106 @@ function parsePermissionsPolicy(raw) {
|
|
|
12536
12758
|
if (features.length === 0) return { error: "No directives found" };
|
|
12537
12759
|
return buildPermissionsPolicy(features);
|
|
12538
12760
|
}
|
|
12761
|
+
var CLIENT_HINTS = [
|
|
12762
|
+
{ name: "Sec-CH-UA", description: "The browser's brand(s) and significant version, sent automatically on every request without an Accept-CH opt-in.", lowEntropy: true, valueType: "sf-list-brand" },
|
|
12763
|
+
{ name: "Sec-CH-UA-Mobile", description: "Whether the browser is running on a mobile device (?1) or not (?0).", lowEntropy: true, valueType: "boolean" },
|
|
12764
|
+
{ name: "Sec-CH-UA-Platform", description: 'The platform/OS the browser is running on, e.g. "Windows" or "Android".', lowEntropy: true, valueType: "string" },
|
|
12765
|
+
{ name: "Sec-CH-UA-Full-Version-List", description: "The full version number for each brand in the user agent, not just the significant version.", lowEntropy: false, valueType: "sf-list-brand" },
|
|
12766
|
+
{ name: "Sec-CH-UA-Platform-Version", description: 'The exact OS version, e.g. "15.0.0".', lowEntropy: false, valueType: "string" },
|
|
12767
|
+
{ name: "Sec-CH-UA-Arch", description: 'The underlying CPU architecture, e.g. "x86" or "arm".', lowEntropy: false, valueType: "string" },
|
|
12768
|
+
{ name: "Sec-CH-UA-Bitness", description: 'The CPU architecture bitness, e.g. "64".', lowEntropy: false, valueType: "string" },
|
|
12769
|
+
{ name: "Sec-CH-UA-Model", description: "The device model, mostly populated on mobile devices.", lowEntropy: false, valueType: "string" },
|
|
12770
|
+
{ name: "Sec-CH-UA-WoW64", description: "Whether a 32-bit browser is running on 64-bit Windows.", lowEntropy: false, valueType: "boolean" },
|
|
12771
|
+
{ name: "Sec-CH-UA-Form-Factor", description: `The device's form factor, e.g. "Desktop", "Mobile", "Tablet", or "XR".`, lowEntropy: false, valueType: "string" },
|
|
12772
|
+
{ name: "Sec-CH-Prefers-Color-Scheme", description: "The user's preferred color scheme, mirrors the prefers-color-scheme media feature.", lowEntropy: false, valueType: "string" },
|
|
12773
|
+
{ name: "Sec-CH-Prefers-Reduced-Motion", description: "Whether the user has requested reduced motion.", lowEntropy: false, valueType: "string" },
|
|
12774
|
+
{ name: "Sec-CH-Prefers-Reduced-Transparency", description: "Whether the user has requested reduced transparency.", lowEntropy: false, valueType: "string" },
|
|
12775
|
+
{ name: "Sec-CH-Viewport-Width", description: "The layout viewport width in CSS pixels.", lowEntropy: false, valueType: "number" },
|
|
12776
|
+
{ name: "Sec-CH-Viewport-Height", description: "The layout viewport height in CSS pixels.", lowEntropy: false, valueType: "number" },
|
|
12777
|
+
{ name: "Sec-CH-DPR", description: "The device pixel ratio.", lowEntropy: false, valueType: "number" },
|
|
12778
|
+
{ name: "Sec-CH-Width", description: "The intrinsic width of a requested image resource, set per-request via the image's `sizes` attribute.", lowEntropy: false, valueType: "number" },
|
|
12779
|
+
{ name: "Sec-CH-Device-Memory", description: "Approximate device RAM in GiB, rounded to the nearest power of two for privacy.", lowEntropy: false, valueType: "number" },
|
|
12780
|
+
{ name: "Save-Data", description: "Legacy hint signaling the user opted into a reduced-data mode; sent automatically like a low-entropy hint.", lowEntropy: true, valueType: "boolean" }
|
|
12781
|
+
];
|
|
12782
|
+
function _findClientHint(raw) {
|
|
12783
|
+
const normalized = raw.trim().toLowerCase();
|
|
12784
|
+
return CLIENT_HINTS.find((d) => d.name.toLowerCase() === normalized);
|
|
12785
|
+
}
|
|
12786
|
+
function buildClientHints(hintNames, criticalHintNames = []) {
|
|
12787
|
+
if (!Array.isArray(hintNames) || hintNames.length === 0) return { error: "At least one client hint is required" };
|
|
12788
|
+
const resolved = [];
|
|
12789
|
+
for (const raw of hintNames) {
|
|
12790
|
+
if (typeof raw !== "string" || raw.trim() === "") continue;
|
|
12791
|
+
const def = _findClientHint(raw);
|
|
12792
|
+
if (!def) return { error: `Unknown client hint: "${raw}"` };
|
|
12793
|
+
resolved.push(def);
|
|
12794
|
+
}
|
|
12795
|
+
if (resolved.length === 0) return { error: "At least one client hint is required" };
|
|
12796
|
+
const critical = [];
|
|
12797
|
+
if (Array.isArray(criticalHintNames)) {
|
|
12798
|
+
for (const raw of criticalHintNames) {
|
|
12799
|
+
if (typeof raw !== "string" || raw.trim() === "") continue;
|
|
12800
|
+
const def = _findClientHint(raw);
|
|
12801
|
+
if (!def) return { error: `Unknown client hint: "${raw}"` };
|
|
12802
|
+
if (!resolved.some((d) => d.name === def.name)) {
|
|
12803
|
+
return { error: `Critical hint "${def.name}" must also be included in hintNames` };
|
|
12804
|
+
}
|
|
12805
|
+
critical.push(def);
|
|
12806
|
+
}
|
|
12807
|
+
}
|
|
12808
|
+
const uniqueNames = Array.from(new Set(resolved.map((d) => d.name)));
|
|
12809
|
+
const result = {
|
|
12810
|
+
acceptCH: uniqueNames.join(", "),
|
|
12811
|
+
hints: resolved.map((d) => ({ name: d.name, description: d.description, lowEntropy: d.lowEntropy }))
|
|
12812
|
+
};
|
|
12813
|
+
if (critical.length > 0) {
|
|
12814
|
+
result.criticalCH = Array.from(new Set(critical.map((d) => d.name))).join(", ");
|
|
12815
|
+
}
|
|
12816
|
+
return result;
|
|
12817
|
+
}
|
|
12818
|
+
function _decodeClientHintValue(valueType, rawValue) {
|
|
12819
|
+
switch (valueType) {
|
|
12820
|
+
case "boolean":
|
|
12821
|
+
if (rawValue === "?1") return true;
|
|
12822
|
+
if (rawValue === "?0") return false;
|
|
12823
|
+
return rawValue;
|
|
12824
|
+
case "string":
|
|
12825
|
+
return rawValue.replace(/^"|"$/g, "");
|
|
12826
|
+
case "number": {
|
|
12827
|
+
const n = Number(rawValue);
|
|
12828
|
+
return Number.isFinite(n) ? n : rawValue;
|
|
12829
|
+
}
|
|
12830
|
+
case "sf-list-brand":
|
|
12831
|
+
return rawValue.split(",").map((part) => {
|
|
12832
|
+
const m = part.trim().match(/^"([^"]*)";v="([^"]*)"$/);
|
|
12833
|
+
return m ? { brand: m[1], version: m[2] } : { raw: part.trim() };
|
|
12834
|
+
});
|
|
12835
|
+
default:
|
|
12836
|
+
return rawValue;
|
|
12837
|
+
}
|
|
12838
|
+
}
|
|
12839
|
+
function parseClientHintHeaders(rawHeaders) {
|
|
12840
|
+
if (typeof rawHeaders !== "string" || rawHeaders.trim() === "") return { error: "Provide one or more header lines to parse" };
|
|
12841
|
+
const lines = rawHeaders.split("\n").map((l) => l.trim()).filter((l) => l.length > 0);
|
|
12842
|
+
const hints = [];
|
|
12843
|
+
const unrecognized = [];
|
|
12844
|
+
for (const line of lines) {
|
|
12845
|
+
const idx = line.indexOf(":");
|
|
12846
|
+
if (idx === -1) continue;
|
|
12847
|
+
const name = line.slice(0, idx).trim();
|
|
12848
|
+
const rawValue = line.slice(idx + 1).trim();
|
|
12849
|
+
const def = _findClientHint(name);
|
|
12850
|
+
if (!def) {
|
|
12851
|
+
unrecognized.push({ name, rawValue });
|
|
12852
|
+
continue;
|
|
12853
|
+
}
|
|
12854
|
+
hints.push({ name: def.name, rawValue, description: def.description, value: _decodeClientHintValue(def.valueType, rawValue) });
|
|
12855
|
+
}
|
|
12856
|
+
if (hints.length === 0 && unrecognized.length === 0) {
|
|
12857
|
+
return { error: 'No parsable header lines found (expected "Header-Name: value" per line)' };
|
|
12858
|
+
}
|
|
12859
|
+
return { hints, unrecognized };
|
|
12860
|
+
}
|
|
12539
12861
|
|
|
12540
12862
|
// src/tools/api.ts
|
|
12541
12863
|
var api_exports = {};
|
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
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
|
-
export { t as text } from './text-
|
|
4
|
+
export { t as text } from './text-DWUcY8H1.cjs';
|
|
5
5
|
export { d as data } from './data-BKpEOcOX.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-DU4Pisfx.cjs';
|
|
9
|
+
export { n as network } from './network-Bzm1tjMA.cjs';
|
|
10
10
|
export { a as api } from './api-DmTNE4c1.cjs';
|
|
11
11
|
export { c as code } from './code-KXoRsHtl.cjs';
|
|
12
12
|
export { c as color } from './color-tPwZCr9H.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
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
|
-
export { t as text } from './text-
|
|
4
|
+
export { t as text } from './text-DWUcY8H1.js';
|
|
5
5
|
export { d as data } from './data-BKpEOcOX.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-DU4Pisfx.js';
|
|
9
|
+
export { n as network } from './network-Bzm1tjMA.js';
|
|
10
10
|
export { a as api } from './api-DmTNE4c1.js';
|
|
11
11
|
export { c as code } from './code-KXoRsHtl.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-L6V4W4SU.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-KMQHBUYO.js';
|
|
3
|
+
export { network_exports as network } from './chunk-7PEKYLRB.js';
|
|
4
4
|
export { api_exports as api } from './chunk-52ZDKSIX.js';
|
|
5
5
|
export { code_exports as code } from './chunk-JL7YTXRB.js';
|
|
6
6
|
export { color_exports as color } from './chunk-BPVAB4P2.js';
|
|
@@ -10,7 +10,7 @@ export { ai_agent_exports as ai_agent } from './chunk-EKIXOA7B.js';
|
|
|
10
10
|
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
|
-
export { text_exports as text } from './chunk-
|
|
13
|
+
export { text_exports as text } from './chunk-P7TXG7CI.js';
|
|
14
14
|
export { data_exports as data } from './chunk-JR354NH4.js';
|
|
15
15
|
export { generators_exports as generators } from './chunk-3TYWIX3B.js';
|
|
16
16
|
export { time_exports as time } from './chunk-IEPWZERQ.js';
|
|
@@ -593,12 +593,67 @@ declare function buildPermissionsPolicy(features: PermissionsPolicyFeatureInput[
|
|
|
593
593
|
declare function parsePermissionsPolicy(raw: string): PermissionsPolicyResult | {
|
|
594
594
|
error: string;
|
|
595
595
|
};
|
|
596
|
+
type ClientHintValueType = 'sf-list-brand' | 'boolean' | 'string' | 'number';
|
|
597
|
+
interface ClientHintDef {
|
|
598
|
+
name: string;
|
|
599
|
+
description: string;
|
|
600
|
+
lowEntropy: boolean;
|
|
601
|
+
valueType: ClientHintValueType;
|
|
602
|
+
}
|
|
603
|
+
declare const CLIENT_HINTS: ClientHintDef[];
|
|
604
|
+
interface ClientHintsBuildResult {
|
|
605
|
+
acceptCH: string;
|
|
606
|
+
criticalCH?: string;
|
|
607
|
+
hints: {
|
|
608
|
+
name: string;
|
|
609
|
+
description: string;
|
|
610
|
+
lowEntropy: boolean;
|
|
611
|
+
}[];
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Build an `Accept-CH` response-header value from a list of client hint
|
|
615
|
+
* names the server wants the browser to send on future requests, attaching
|
|
616
|
+
* a plain-English note on what each hint reveals. Pass a subset of those
|
|
617
|
+
* names as `criticalHintNames` to also build a `Critical-CH` header value,
|
|
618
|
+
* for hints the server needs on the very first request of a session.
|
|
619
|
+
*/
|
|
620
|
+
declare function buildClientHints(hintNames: string[], criticalHintNames?: string[]): ClientHintsBuildResult | {
|
|
621
|
+
error: string;
|
|
622
|
+
};
|
|
623
|
+
interface ParsedClientHint {
|
|
624
|
+
name: string;
|
|
625
|
+
rawValue: string;
|
|
626
|
+
description: string;
|
|
627
|
+
value: unknown;
|
|
628
|
+
}
|
|
629
|
+
interface ClientHintsParseResult {
|
|
630
|
+
hints: ParsedClientHint[];
|
|
631
|
+
unrecognized: {
|
|
632
|
+
name: string;
|
|
633
|
+
rawValue: string;
|
|
634
|
+
}[];
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Parse raw request-header text, one `Header-Name: value` per line, into
|
|
638
|
+
* decoded client hint values: brand/version pairs for Sec-CH-UA-style
|
|
639
|
+
* headers, booleans for `?1`/`?0` values, unquoted strings, and numbers.
|
|
640
|
+
* Lines whose header name isn't a recognized client hint are returned
|
|
641
|
+
* separately under `unrecognized` rather than dropped.
|
|
642
|
+
*/
|
|
643
|
+
declare function parseClientHintHeaders(rawHeaders: string): ClientHintsParseResult | {
|
|
644
|
+
error: string;
|
|
645
|
+
};
|
|
596
646
|
|
|
597
647
|
type network_AuthResultEntry = AuthResultEntry;
|
|
598
648
|
type network_BuildRangeHeaderOptions = BuildRangeHeaderOptions;
|
|
649
|
+
declare const network_CLIENT_HINTS: typeof CLIENT_HINTS;
|
|
599
650
|
type network_CacheControlDirective = CacheControlDirective;
|
|
600
651
|
type network_CacheControlOptions = CacheControlOptions;
|
|
601
652
|
type network_CacheControlResult = CacheControlResult;
|
|
653
|
+
type network_ClientHintDef = ClientHintDef;
|
|
654
|
+
type network_ClientHintValueType = ClientHintValueType;
|
|
655
|
+
type network_ClientHintsBuildResult = ClientHintsBuildResult;
|
|
656
|
+
type network_ClientHintsParseResult = ClientHintsParseResult;
|
|
602
657
|
type network_ContentRangeResult = ContentRangeResult;
|
|
603
658
|
type network_CookieAttributes = CookieAttributes;
|
|
604
659
|
type network_CookieCheckResult = CookieCheckResult;
|
|
@@ -626,6 +681,7 @@ type network_ManifestIconInfo = ManifestIconInfo;
|
|
|
626
681
|
type network_ManifestIssue = ManifestIssue;
|
|
627
682
|
type network_ManifestValidationResult = ManifestValidationResult;
|
|
628
683
|
declare const network_PERMISSIONS_POLICY_FEATURES: typeof PERMISSIONS_POLICY_FEATURES;
|
|
684
|
+
type network_ParsedClientHint = ParsedClientHint;
|
|
629
685
|
type network_ParsedDnsResult = ParsedDnsResult;
|
|
630
686
|
type network_ParsedGeoResult = ParsedGeoResult;
|
|
631
687
|
type network_PermissionsPolicyDirective = PermissionsPolicyDirective;
|
|
@@ -656,6 +712,7 @@ type network_VaryHeaderEntry = VaryHeaderEntry;
|
|
|
656
712
|
type network_VaryHeaderResult = VaryHeaderResult;
|
|
657
713
|
declare const network_analyzeEmailHeaders: typeof analyzeEmailHeaders;
|
|
658
714
|
declare const network_buildCacheControl: typeof buildCacheControl;
|
|
715
|
+
declare const network_buildClientHints: typeof buildClientHints;
|
|
659
716
|
declare const network_buildDnsQueryUrl: typeof buildDnsQueryUrl;
|
|
660
717
|
declare const network_buildGeoUrl: typeof buildGeoUrl;
|
|
661
718
|
declare const network_buildLinkHeader: typeof buildLinkHeader;
|
|
@@ -679,6 +736,7 @@ declare const network_isSuccess: typeof isSuccess;
|
|
|
679
736
|
declare const network_isValidIp: typeof isValidIp;
|
|
680
737
|
declare const network_isValidIpv4: typeof isValidIpv4;
|
|
681
738
|
declare const network_isValidIpv6: typeof isValidIpv6;
|
|
739
|
+
declare const network_parseClientHintHeaders: typeof parseClientHintHeaders;
|
|
682
740
|
declare const network_parseContentRangeHeader: typeof parseContentRangeHeader;
|
|
683
741
|
declare const network_parseDnsResponse: typeof parseDnsResponse;
|
|
684
742
|
declare const network_parseGeoResponse: typeof parseGeoResponse;
|
|
@@ -698,7 +756,7 @@ declare const network_validateManifest: typeof validateManifest;
|
|
|
698
756
|
declare const network_validateRobotsTxt: typeof validateRobotsTxt;
|
|
699
757
|
declare const network_validateSitemap: typeof validateSitemap;
|
|
700
758
|
declare namespace network {
|
|
701
|
-
export { type network_AuthResultEntry as AuthResultEntry, type network_BuildRangeHeaderOptions as BuildRangeHeaderOptions, type network_CacheControlDirective as CacheControlDirective, type network_CacheControlOptions as CacheControlOptions, type network_CacheControlResult as CacheControlResult, type network_ContentRangeResult as ContentRangeResult, 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_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_SitemapUrlEntry as SitemapUrlEntry, type network_SitemapValidationResult as SitemapValidationResult, 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, network_analyzeEmailHeaders as analyzeEmailHeaders, network_buildCacheControl as buildCacheControl, 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_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_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_searchHeaders as searchHeaders, network_searchStatusCodes as searchStatusCodes, 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 };
|
|
759
|
+
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_ContentRangeResult as ContentRangeResult, 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_SitemapUrlEntry as SitemapUrlEntry, type network_SitemapValidationResult as SitemapValidationResult, 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, network_analyzeEmailHeaders as analyzeEmailHeaders, network_buildCacheControl as buildCacheControl, network_buildClientHints as buildClientHints, 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_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_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_searchHeaders as searchHeaders, network_searchStatusCodes as searchStatusCodes, 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 };
|
|
702
760
|
}
|
|
703
761
|
|
|
704
|
-
export { type
|
|
762
|
+
export { type RobotsIssue as $, type AuthResultEntry as A, type BuildRangeHeaderOptions as B, CLIENT_HINTS as C, DNS_RECORD_TYPES as D, type EmailHeaderAnalysis as E, type ManifestValidationResult as F, type GeoResult as G, HTTP_HEADERS as H, type Ipv6AddressType as I, type ParsedClientHint as J, type ParsedDnsResult as K, LINK_REL_VALUES as L, type ManifestIconInfo as M, type ParsedGeoResult as N, type PermissionsPolicyDirective as O, PERMISSIONS_POLICY_FEATURES as P, type PermissionsPolicyFeatureInput as Q, type PermissionsPolicyResult as R, REFERRER_POLICY_VALUES as S, type RangeEntry as T, type RangeEntryInput as U, type RangeHeaderResult as V, type ReceivedHop as W, type ReferrerPolicyEntry as X, type ReferrerPolicyResult as Y, type ReferrerPolicyValue as Z, type RobotsGroup as _, type CacheControlDirective as a, type RobotsRule as a0, type RobotsValidationResult as a1, STATUS_CODES as a2, type SameSiteValue as a3, type SitemapIndexEntry as a4, type SitemapIssue as a5, type SitemapUrlEntry as a6, type SitemapValidationResult as a7, type StatusCode as a8, type UaDeviceType as a9, isValidIp as aA, isValidIpv4 as aB, isValidIpv6 as aC, parseClientHintHeaders as aD, parseContentRangeHeader as aE, parseDnsResponse as aF, parseGeoResponse as aG, parseHar as aH, parseIpv6Address as aI, parsePermissionsPolicy as aJ, parseUserAgent as aK, parseVaryHeader as aL, searchHeaders as aM, searchStatusCodes as aN, statusCodeToText as aO, typeNumberToLabel as aP, validateDomain as aQ, validateHeaderName as aR, validateHeaderValue as aS, validateManifest as aT, validateRobotsTxt as aU, validateSitemap as aV, type UserAgentInfo as aa, type VaryHeaderEntry as ab, type VaryHeaderResult as ac, analyzeEmailHeaders as ad, buildCacheControl as ae, buildClientHints as af, buildDnsQueryUrl as ag, buildGeoUrl as ah, buildLinkHeader as ai, buildMapUrl as aj, buildPermissionsPolicy as ak, buildRangeHeader as al, buildReferrerPolicy as am, buildVaryHeader as an, checkSetCookieHeader as ao, countryCodeToFlag as ap, formatCoordinates as aq, formatTtl as ar, getByCategory as as, getHeader as at, getHeadersByCategory as au, getStatusByCategory as av, getStatusCode as aw, isClientError as ax, isServerError as ay, isSuccess as az, type CacheControlOptions as b, type CacheControlResult as c, type ClientHintDef as d, type ClientHintValueType as e, type ClientHintsBuildResult as f, type ClientHintsParseResult as g, type ContentRangeResult as h, type CookieAttributes as i, type CookieCheckResult as j, type DnsRecord as k, type DnsRecordType as l, type DnsResponse as m, network as n, type EmailHeaderField as o, type HarEntry as p, type HarParseResult as q, type HarSummary as r, type HeaderCategory as s, type HttpHeader as t, type Ipv6ParseResult as u, type LinkHeaderEntry as v, type LinkHeaderEntryInput as w, type LinkHeaderResult as x, type LinkRel as y, type ManifestIssue as z };
|