@utilix-tech/sdk 0.46.0 → 0.48.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 +35 -10
- package/dist/{chunk-L6V4W4SU.js → chunk-226EH3ZI.js} +87 -1
- package/dist/{chunk-JR354NH4.js → chunk-4TIY6COQ.js} +64 -1
- package/dist/{chunk-7PEKYLRB.js → chunk-Y7YY733Z.js} +98 -1
- package/dist/{data-BKpEOcOX.d.ts → data-BJVJ879p.d.cts} +30 -2
- package/dist/{data-BKpEOcOX.d.cts → data-BJVJ879p.d.ts} +30 -2
- package/dist/index.cjs +253 -7
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/{media-fD8dJ5qR.d.cts → media-BUvwm4wU.d.cts} +27 -2
- package/dist/{media-fD8dJ5qR.d.ts → media-BUvwm4wU.d.ts} +27 -2
- package/dist/{network-Bzm1tjMA.d.cts → network-DelcJeJa.d.cts} +70 -2
- package/dist/{network-Bzm1tjMA.d.ts → network-DelcJeJa.d.ts} +70 -2
- package/dist/tools/data.cjs +63 -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/media.cjs +86 -0
- package/dist/tools/media.d.cts +1 -1
- package/dist/tools/media.d.ts +1 -1
- package/dist/tools/media.js +1 -1
- package/dist/tools/network.cjs +97 -0
- package/dist/tools/network.d.cts +1 -1
- package/dist/tools/network.d.ts +1 -1
- package/dist/tools/network.js +1 -1
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* - http-headers : HTTP header reference lookup and validation
|
|
10
10
|
* - har-viewer : parseHar
|
|
11
11
|
* - sitemap-validator: validateSitemap
|
|
12
|
+
* - sitemap-index-splitter: splitSitemap
|
|
12
13
|
* - robots-txt-validator: validateRobotsTxt
|
|
13
14
|
* - user-agent-parser: parseUserAgent
|
|
14
15
|
* - cache-control-builder: buildCacheControl
|
|
@@ -201,6 +202,31 @@ interface SitemapValidationResult {
|
|
|
201
202
|
declare function validateSitemap(xml: string): SitemapValidationResult | {
|
|
202
203
|
error: string;
|
|
203
204
|
};
|
|
205
|
+
interface SitemapSplitFile {
|
|
206
|
+
filename: string;
|
|
207
|
+
urlCount: number;
|
|
208
|
+
xml: string;
|
|
209
|
+
}
|
|
210
|
+
interface SplitSitemapResult {
|
|
211
|
+
files: SitemapSplitFile[];
|
|
212
|
+
indexXml: string;
|
|
213
|
+
totalUrls: number;
|
|
214
|
+
}
|
|
215
|
+
interface SplitSitemapOptions {
|
|
216
|
+
baseUrl: string;
|
|
217
|
+
urlsPerFile?: number;
|
|
218
|
+
filePrefix?: string;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Split a newline-separated URL list exceeding the sitemaps.org 50,000-URL
|
|
222
|
+
* cap into multiple sitemap.xml files plus a sitemap index file. Validation
|
|
223
|
+
* of each URL line is reported 1-indexed against the list of non-empty
|
|
224
|
+
* lines (blank lines are dropped before counting/validating, so a blank
|
|
225
|
+
* line does not shift the reported line number of a later error).
|
|
226
|
+
*/
|
|
227
|
+
declare function splitSitemap(urlsText: string, options: SplitSitemapOptions): SplitSitemapResult | {
|
|
228
|
+
error: string;
|
|
229
|
+
};
|
|
204
230
|
interface RobotsRule {
|
|
205
231
|
type: 'allow' | 'disallow';
|
|
206
232
|
value: string;
|
|
@@ -643,6 +669,39 @@ interface ClientHintsParseResult {
|
|
|
643
669
|
declare function parseClientHintHeaders(rawHeaders: string): ClientHintsParseResult | {
|
|
644
670
|
error: string;
|
|
645
671
|
};
|
|
672
|
+
interface ContentDispositionBuildOptions {
|
|
673
|
+
type?: 'inline' | 'attachment';
|
|
674
|
+
filename?: string;
|
|
675
|
+
}
|
|
676
|
+
interface ContentDispositionBuildResult {
|
|
677
|
+
header: string;
|
|
678
|
+
type: string;
|
|
679
|
+
filename?: string;
|
|
680
|
+
filenameEncoded: boolean;
|
|
681
|
+
}
|
|
682
|
+
interface ContentDispositionParseResult {
|
|
683
|
+
type: string;
|
|
684
|
+
filename?: string;
|
|
685
|
+
filenameIsExtended: boolean;
|
|
686
|
+
params: Record<string, string>;
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Build a `Content-Disposition` response-header value for a file download
|
|
690
|
+
* or inline display. A filename containing non-ASCII characters gets an
|
|
691
|
+
* ASCII-sanitized `filename` fallback plus an RFC 5987 `filename*` extended
|
|
692
|
+
* parameter carrying the exact UTF-8 encoded name.
|
|
693
|
+
*/
|
|
694
|
+
declare function buildContentDisposition(options?: ContentDispositionBuildOptions): ContentDispositionBuildResult | {
|
|
695
|
+
error: string;
|
|
696
|
+
};
|
|
697
|
+
/**
|
|
698
|
+
* Parse a `Content-Disposition` header value into its disposition type,
|
|
699
|
+
* filename (decoding an RFC 5987 `filename*` parameter in preference to a
|
|
700
|
+
* plain `filename`, if both are present), and raw parameters.
|
|
701
|
+
*/
|
|
702
|
+
declare function parseContentDisposition(header: string): ContentDispositionParseResult | {
|
|
703
|
+
error: string;
|
|
704
|
+
};
|
|
646
705
|
|
|
647
706
|
type network_AuthResultEntry = AuthResultEntry;
|
|
648
707
|
type network_BuildRangeHeaderOptions = BuildRangeHeaderOptions;
|
|
@@ -654,6 +713,9 @@ type network_ClientHintDef = ClientHintDef;
|
|
|
654
713
|
type network_ClientHintValueType = ClientHintValueType;
|
|
655
714
|
type network_ClientHintsBuildResult = ClientHintsBuildResult;
|
|
656
715
|
type network_ClientHintsParseResult = ClientHintsParseResult;
|
|
716
|
+
type network_ContentDispositionBuildOptions = ContentDispositionBuildOptions;
|
|
717
|
+
type network_ContentDispositionBuildResult = ContentDispositionBuildResult;
|
|
718
|
+
type network_ContentDispositionParseResult = ContentDispositionParseResult;
|
|
657
719
|
type network_ContentRangeResult = ContentRangeResult;
|
|
658
720
|
type network_CookieAttributes = CookieAttributes;
|
|
659
721
|
type network_CookieCheckResult = CookieCheckResult;
|
|
@@ -703,8 +765,11 @@ declare const network_STATUS_CODES: typeof STATUS_CODES;
|
|
|
703
765
|
type network_SameSiteValue = SameSiteValue;
|
|
704
766
|
type network_SitemapIndexEntry = SitemapIndexEntry;
|
|
705
767
|
type network_SitemapIssue = SitemapIssue;
|
|
768
|
+
type network_SitemapSplitFile = SitemapSplitFile;
|
|
706
769
|
type network_SitemapUrlEntry = SitemapUrlEntry;
|
|
707
770
|
type network_SitemapValidationResult = SitemapValidationResult;
|
|
771
|
+
type network_SplitSitemapOptions = SplitSitemapOptions;
|
|
772
|
+
type network_SplitSitemapResult = SplitSitemapResult;
|
|
708
773
|
type network_StatusCode = StatusCode;
|
|
709
774
|
type network_UaDeviceType = UaDeviceType;
|
|
710
775
|
type network_UserAgentInfo = UserAgentInfo;
|
|
@@ -713,6 +778,7 @@ type network_VaryHeaderResult = VaryHeaderResult;
|
|
|
713
778
|
declare const network_analyzeEmailHeaders: typeof analyzeEmailHeaders;
|
|
714
779
|
declare const network_buildCacheControl: typeof buildCacheControl;
|
|
715
780
|
declare const network_buildClientHints: typeof buildClientHints;
|
|
781
|
+
declare const network_buildContentDisposition: typeof buildContentDisposition;
|
|
716
782
|
declare const network_buildDnsQueryUrl: typeof buildDnsQueryUrl;
|
|
717
783
|
declare const network_buildGeoUrl: typeof buildGeoUrl;
|
|
718
784
|
declare const network_buildLinkHeader: typeof buildLinkHeader;
|
|
@@ -737,6 +803,7 @@ declare const network_isValidIp: typeof isValidIp;
|
|
|
737
803
|
declare const network_isValidIpv4: typeof isValidIpv4;
|
|
738
804
|
declare const network_isValidIpv6: typeof isValidIpv6;
|
|
739
805
|
declare const network_parseClientHintHeaders: typeof parseClientHintHeaders;
|
|
806
|
+
declare const network_parseContentDisposition: typeof parseContentDisposition;
|
|
740
807
|
declare const network_parseContentRangeHeader: typeof parseContentRangeHeader;
|
|
741
808
|
declare const network_parseDnsResponse: typeof parseDnsResponse;
|
|
742
809
|
declare const network_parseGeoResponse: typeof parseGeoResponse;
|
|
@@ -747,6 +814,7 @@ declare const network_parseUserAgent: typeof parseUserAgent;
|
|
|
747
814
|
declare const network_parseVaryHeader: typeof parseVaryHeader;
|
|
748
815
|
declare const network_searchHeaders: typeof searchHeaders;
|
|
749
816
|
declare const network_searchStatusCodes: typeof searchStatusCodes;
|
|
817
|
+
declare const network_splitSitemap: typeof splitSitemap;
|
|
750
818
|
declare const network_statusCodeToText: typeof statusCodeToText;
|
|
751
819
|
declare const network_typeNumberToLabel: typeof typeNumberToLabel;
|
|
752
820
|
declare const network_validateDomain: typeof validateDomain;
|
|
@@ -756,7 +824,7 @@ declare const network_validateManifest: typeof validateManifest;
|
|
|
756
824
|
declare const network_validateRobotsTxt: typeof validateRobotsTxt;
|
|
757
825
|
declare const network_validateSitemap: typeof validateSitemap;
|
|
758
826
|
declare namespace network {
|
|
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 };
|
|
827
|
+
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_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, network_analyzeEmailHeaders as analyzeEmailHeaders, 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_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_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 };
|
|
760
828
|
}
|
|
761
829
|
|
|
762
|
-
export { type
|
|
830
|
+
export { type ReferrerPolicyResult as $, type AuthResultEntry as A, type BuildRangeHeaderOptions as B, CLIENT_HINTS as C, DNS_RECORD_TYPES as D, type EmailHeaderAnalysis as E, type LinkHeaderResult as F, type GeoResult as G, HTTP_HEADERS as H, type Ipv6AddressType as I, type LinkRel as J, type ManifestIssue as K, LINK_REL_VALUES as L, type ManifestIconInfo as M, type ManifestValidationResult as N, type ParsedClientHint as O, PERMISSIONS_POLICY_FEATURES as P, type ParsedDnsResult as Q, type ParsedGeoResult as R, type PermissionsPolicyDirective as S, type PermissionsPolicyFeatureInput as T, type PermissionsPolicyResult as U, REFERRER_POLICY_VALUES as V, type RangeEntry as W, type RangeEntryInput as X, type RangeHeaderResult as Y, type ReceivedHop as Z, type ReferrerPolicyEntry as _, type CacheControlDirective as a, validateHeaderValue as a$, type ReferrerPolicyValue as a0, type RobotsGroup as a1, type RobotsIssue as a2, type RobotsRule as a3, type RobotsValidationResult as a4, STATUS_CODES as a5, type SameSiteValue as a6, type SitemapIndexEntry as a7, type SitemapIssue as a8, type SitemapSplitFile as a9, getHeader as aA, getHeadersByCategory as aB, getStatusByCategory as aC, getStatusCode as aD, isClientError as aE, isServerError as aF, isSuccess as aG, isValidIp as aH, isValidIpv4 as aI, isValidIpv6 as aJ, parseClientHintHeaders as aK, parseContentDisposition as aL, parseContentRangeHeader as aM, parseDnsResponse as aN, parseGeoResponse as aO, parseHar as aP, parseIpv6Address as aQ, parsePermissionsPolicy as aR, parseUserAgent as aS, parseVaryHeader as aT, searchHeaders as aU, searchStatusCodes as aV, splitSitemap as aW, statusCodeToText as aX, typeNumberToLabel as aY, validateDomain as aZ, validateHeaderName as a_, type SitemapUrlEntry as aa, type SitemapValidationResult as ab, type SplitSitemapOptions as ac, type SplitSitemapResult as ad, type StatusCode as ae, type UaDeviceType as af, type UserAgentInfo as ag, type VaryHeaderEntry as ah, type VaryHeaderResult as ai, analyzeEmailHeaders as aj, buildCacheControl as ak, buildClientHints as al, buildContentDisposition as am, buildDnsQueryUrl as an, buildGeoUrl as ao, buildLinkHeader as ap, buildMapUrl as aq, buildPermissionsPolicy as ar, buildRangeHeader as as, buildReferrerPolicy as at, buildVaryHeader as au, checkSetCookieHeader as av, countryCodeToFlag as aw, formatCoordinates as ax, formatTtl as ay, getByCategory as az, type CacheControlOptions as b, validateManifest as b0, validateRobotsTxt as b1, validateSitemap as b2, type CacheControlResult as c, type ClientHintDef as d, type ClientHintValueType as e, type ClientHintsBuildResult as f, type ClientHintsParseResult as g, type ContentDispositionBuildOptions as h, type ContentDispositionBuildResult as i, type ContentDispositionParseResult as j, type ContentRangeResult as k, type CookieAttributes as l, type CookieCheckResult as m, network as n, type DnsRecord as o, type DnsRecordType as p, type DnsResponse as q, type EmailHeaderField as r, type HarEntry as s, type HarParseResult as t, type HarSummary as u, type HeaderCategory as v, type HttpHeader as w, type Ipv6ParseResult as x, type LinkHeaderEntry as y, type LinkHeaderEntryInput as z };
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* - http-headers : HTTP header reference lookup and validation
|
|
10
10
|
* - har-viewer : parseHar
|
|
11
11
|
* - sitemap-validator: validateSitemap
|
|
12
|
+
* - sitemap-index-splitter: splitSitemap
|
|
12
13
|
* - robots-txt-validator: validateRobotsTxt
|
|
13
14
|
* - user-agent-parser: parseUserAgent
|
|
14
15
|
* - cache-control-builder: buildCacheControl
|
|
@@ -201,6 +202,31 @@ interface SitemapValidationResult {
|
|
|
201
202
|
declare function validateSitemap(xml: string): SitemapValidationResult | {
|
|
202
203
|
error: string;
|
|
203
204
|
};
|
|
205
|
+
interface SitemapSplitFile {
|
|
206
|
+
filename: string;
|
|
207
|
+
urlCount: number;
|
|
208
|
+
xml: string;
|
|
209
|
+
}
|
|
210
|
+
interface SplitSitemapResult {
|
|
211
|
+
files: SitemapSplitFile[];
|
|
212
|
+
indexXml: string;
|
|
213
|
+
totalUrls: number;
|
|
214
|
+
}
|
|
215
|
+
interface SplitSitemapOptions {
|
|
216
|
+
baseUrl: string;
|
|
217
|
+
urlsPerFile?: number;
|
|
218
|
+
filePrefix?: string;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Split a newline-separated URL list exceeding the sitemaps.org 50,000-URL
|
|
222
|
+
* cap into multiple sitemap.xml files plus a sitemap index file. Validation
|
|
223
|
+
* of each URL line is reported 1-indexed against the list of non-empty
|
|
224
|
+
* lines (blank lines are dropped before counting/validating, so a blank
|
|
225
|
+
* line does not shift the reported line number of a later error).
|
|
226
|
+
*/
|
|
227
|
+
declare function splitSitemap(urlsText: string, options: SplitSitemapOptions): SplitSitemapResult | {
|
|
228
|
+
error: string;
|
|
229
|
+
};
|
|
204
230
|
interface RobotsRule {
|
|
205
231
|
type: 'allow' | 'disallow';
|
|
206
232
|
value: string;
|
|
@@ -643,6 +669,39 @@ interface ClientHintsParseResult {
|
|
|
643
669
|
declare function parseClientHintHeaders(rawHeaders: string): ClientHintsParseResult | {
|
|
644
670
|
error: string;
|
|
645
671
|
};
|
|
672
|
+
interface ContentDispositionBuildOptions {
|
|
673
|
+
type?: 'inline' | 'attachment';
|
|
674
|
+
filename?: string;
|
|
675
|
+
}
|
|
676
|
+
interface ContentDispositionBuildResult {
|
|
677
|
+
header: string;
|
|
678
|
+
type: string;
|
|
679
|
+
filename?: string;
|
|
680
|
+
filenameEncoded: boolean;
|
|
681
|
+
}
|
|
682
|
+
interface ContentDispositionParseResult {
|
|
683
|
+
type: string;
|
|
684
|
+
filename?: string;
|
|
685
|
+
filenameIsExtended: boolean;
|
|
686
|
+
params: Record<string, string>;
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Build a `Content-Disposition` response-header value for a file download
|
|
690
|
+
* or inline display. A filename containing non-ASCII characters gets an
|
|
691
|
+
* ASCII-sanitized `filename` fallback plus an RFC 5987 `filename*` extended
|
|
692
|
+
* parameter carrying the exact UTF-8 encoded name.
|
|
693
|
+
*/
|
|
694
|
+
declare function buildContentDisposition(options?: ContentDispositionBuildOptions): ContentDispositionBuildResult | {
|
|
695
|
+
error: string;
|
|
696
|
+
};
|
|
697
|
+
/**
|
|
698
|
+
* Parse a `Content-Disposition` header value into its disposition type,
|
|
699
|
+
* filename (decoding an RFC 5987 `filename*` parameter in preference to a
|
|
700
|
+
* plain `filename`, if both are present), and raw parameters.
|
|
701
|
+
*/
|
|
702
|
+
declare function parseContentDisposition(header: string): ContentDispositionParseResult | {
|
|
703
|
+
error: string;
|
|
704
|
+
};
|
|
646
705
|
|
|
647
706
|
type network_AuthResultEntry = AuthResultEntry;
|
|
648
707
|
type network_BuildRangeHeaderOptions = BuildRangeHeaderOptions;
|
|
@@ -654,6 +713,9 @@ type network_ClientHintDef = ClientHintDef;
|
|
|
654
713
|
type network_ClientHintValueType = ClientHintValueType;
|
|
655
714
|
type network_ClientHintsBuildResult = ClientHintsBuildResult;
|
|
656
715
|
type network_ClientHintsParseResult = ClientHintsParseResult;
|
|
716
|
+
type network_ContentDispositionBuildOptions = ContentDispositionBuildOptions;
|
|
717
|
+
type network_ContentDispositionBuildResult = ContentDispositionBuildResult;
|
|
718
|
+
type network_ContentDispositionParseResult = ContentDispositionParseResult;
|
|
657
719
|
type network_ContentRangeResult = ContentRangeResult;
|
|
658
720
|
type network_CookieAttributes = CookieAttributes;
|
|
659
721
|
type network_CookieCheckResult = CookieCheckResult;
|
|
@@ -703,8 +765,11 @@ declare const network_STATUS_CODES: typeof STATUS_CODES;
|
|
|
703
765
|
type network_SameSiteValue = SameSiteValue;
|
|
704
766
|
type network_SitemapIndexEntry = SitemapIndexEntry;
|
|
705
767
|
type network_SitemapIssue = SitemapIssue;
|
|
768
|
+
type network_SitemapSplitFile = SitemapSplitFile;
|
|
706
769
|
type network_SitemapUrlEntry = SitemapUrlEntry;
|
|
707
770
|
type network_SitemapValidationResult = SitemapValidationResult;
|
|
771
|
+
type network_SplitSitemapOptions = SplitSitemapOptions;
|
|
772
|
+
type network_SplitSitemapResult = SplitSitemapResult;
|
|
708
773
|
type network_StatusCode = StatusCode;
|
|
709
774
|
type network_UaDeviceType = UaDeviceType;
|
|
710
775
|
type network_UserAgentInfo = UserAgentInfo;
|
|
@@ -713,6 +778,7 @@ type network_VaryHeaderResult = VaryHeaderResult;
|
|
|
713
778
|
declare const network_analyzeEmailHeaders: typeof analyzeEmailHeaders;
|
|
714
779
|
declare const network_buildCacheControl: typeof buildCacheControl;
|
|
715
780
|
declare const network_buildClientHints: typeof buildClientHints;
|
|
781
|
+
declare const network_buildContentDisposition: typeof buildContentDisposition;
|
|
716
782
|
declare const network_buildDnsQueryUrl: typeof buildDnsQueryUrl;
|
|
717
783
|
declare const network_buildGeoUrl: typeof buildGeoUrl;
|
|
718
784
|
declare const network_buildLinkHeader: typeof buildLinkHeader;
|
|
@@ -737,6 +803,7 @@ declare const network_isValidIp: typeof isValidIp;
|
|
|
737
803
|
declare const network_isValidIpv4: typeof isValidIpv4;
|
|
738
804
|
declare const network_isValidIpv6: typeof isValidIpv6;
|
|
739
805
|
declare const network_parseClientHintHeaders: typeof parseClientHintHeaders;
|
|
806
|
+
declare const network_parseContentDisposition: typeof parseContentDisposition;
|
|
740
807
|
declare const network_parseContentRangeHeader: typeof parseContentRangeHeader;
|
|
741
808
|
declare const network_parseDnsResponse: typeof parseDnsResponse;
|
|
742
809
|
declare const network_parseGeoResponse: typeof parseGeoResponse;
|
|
@@ -747,6 +814,7 @@ declare const network_parseUserAgent: typeof parseUserAgent;
|
|
|
747
814
|
declare const network_parseVaryHeader: typeof parseVaryHeader;
|
|
748
815
|
declare const network_searchHeaders: typeof searchHeaders;
|
|
749
816
|
declare const network_searchStatusCodes: typeof searchStatusCodes;
|
|
817
|
+
declare const network_splitSitemap: typeof splitSitemap;
|
|
750
818
|
declare const network_statusCodeToText: typeof statusCodeToText;
|
|
751
819
|
declare const network_typeNumberToLabel: typeof typeNumberToLabel;
|
|
752
820
|
declare const network_validateDomain: typeof validateDomain;
|
|
@@ -756,7 +824,7 @@ declare const network_validateManifest: typeof validateManifest;
|
|
|
756
824
|
declare const network_validateRobotsTxt: typeof validateRobotsTxt;
|
|
757
825
|
declare const network_validateSitemap: typeof validateSitemap;
|
|
758
826
|
declare namespace network {
|
|
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 };
|
|
827
|
+
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_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, network_analyzeEmailHeaders as analyzeEmailHeaders, 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_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_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 };
|
|
760
828
|
}
|
|
761
829
|
|
|
762
|
-
export { type
|
|
830
|
+
export { type ReferrerPolicyResult as $, type AuthResultEntry as A, type BuildRangeHeaderOptions as B, CLIENT_HINTS as C, DNS_RECORD_TYPES as D, type EmailHeaderAnalysis as E, type LinkHeaderResult as F, type GeoResult as G, HTTP_HEADERS as H, type Ipv6AddressType as I, type LinkRel as J, type ManifestIssue as K, LINK_REL_VALUES as L, type ManifestIconInfo as M, type ManifestValidationResult as N, type ParsedClientHint as O, PERMISSIONS_POLICY_FEATURES as P, type ParsedDnsResult as Q, type ParsedGeoResult as R, type PermissionsPolicyDirective as S, type PermissionsPolicyFeatureInput as T, type PermissionsPolicyResult as U, REFERRER_POLICY_VALUES as V, type RangeEntry as W, type RangeEntryInput as X, type RangeHeaderResult as Y, type ReceivedHop as Z, type ReferrerPolicyEntry as _, type CacheControlDirective as a, validateHeaderValue as a$, type ReferrerPolicyValue as a0, type RobotsGroup as a1, type RobotsIssue as a2, type RobotsRule as a3, type RobotsValidationResult as a4, STATUS_CODES as a5, type SameSiteValue as a6, type SitemapIndexEntry as a7, type SitemapIssue as a8, type SitemapSplitFile as a9, getHeader as aA, getHeadersByCategory as aB, getStatusByCategory as aC, getStatusCode as aD, isClientError as aE, isServerError as aF, isSuccess as aG, isValidIp as aH, isValidIpv4 as aI, isValidIpv6 as aJ, parseClientHintHeaders as aK, parseContentDisposition as aL, parseContentRangeHeader as aM, parseDnsResponse as aN, parseGeoResponse as aO, parseHar as aP, parseIpv6Address as aQ, parsePermissionsPolicy as aR, parseUserAgent as aS, parseVaryHeader as aT, searchHeaders as aU, searchStatusCodes as aV, splitSitemap as aW, statusCodeToText as aX, typeNumberToLabel as aY, validateDomain as aZ, validateHeaderName as a_, type SitemapUrlEntry as aa, type SitemapValidationResult as ab, type SplitSitemapOptions as ac, type SplitSitemapResult as ad, type StatusCode as ae, type UaDeviceType as af, type UserAgentInfo as ag, type VaryHeaderEntry as ah, type VaryHeaderResult as ai, analyzeEmailHeaders as aj, buildCacheControl as ak, buildClientHints as al, buildContentDisposition as am, buildDnsQueryUrl as an, buildGeoUrl as ao, buildLinkHeader as ap, buildMapUrl as aq, buildPermissionsPolicy as ar, buildRangeHeader as as, buildReferrerPolicy as at, buildVaryHeader as au, checkSetCookieHeader as av, countryCodeToFlag as aw, formatCoordinates as ax, formatTtl as ay, getByCategory as az, type CacheControlOptions as b, validateManifest as b0, validateRobotsTxt as b1, validateSitemap as b2, type CacheControlResult as c, type ClientHintDef as d, type ClientHintValueType as e, type ClientHintsBuildResult as f, type ClientHintsParseResult as g, type ContentDispositionBuildOptions as h, type ContentDispositionBuildResult as i, type ContentDispositionParseResult as j, type ContentRangeResult as k, type CookieAttributes as l, type CookieCheckResult as m, network as n, type DnsRecord as o, type DnsRecordType as p, type DnsResponse as q, type EmailHeaderField as r, type HarEntry as s, type HarParseResult as t, type HarSummary as u, type HeaderCategory as v, type HttpHeader as w, type Ipv6ParseResult as x, type LinkHeaderEntry as y, type LinkHeaderEntryInput as z };
|
package/dist/tools/data.cjs
CHANGED
|
@@ -1531,6 +1531,68 @@ function findCsvDuplicateRows(input, options) {
|
|
|
1531
1531
|
uniqueRowCount: parsed.rows.length - duplicateRowCount + duplicateGroups.length
|
|
1532
1532
|
};
|
|
1533
1533
|
}
|
|
1534
|
+
var _YAML_ANCHOR_RE = /(?:^|\s)&([A-Za-z0-9_.-]+)/g;
|
|
1535
|
+
var _YAML_ALIAS_RE = /(?:^|\s)\*([A-Za-z0-9_.-]+)/g;
|
|
1536
|
+
function _stripYamlLineComment(line) {
|
|
1537
|
+
let inSingle = false;
|
|
1538
|
+
let inDouble = false;
|
|
1539
|
+
for (let i = 0; i < line.length; i++) {
|
|
1540
|
+
const ch = line[i];
|
|
1541
|
+
if (ch === "'" && !inDouble) {
|
|
1542
|
+
inSingle = !inSingle;
|
|
1543
|
+
} else if (ch === '"' && !inSingle) {
|
|
1544
|
+
inDouble = !inDouble;
|
|
1545
|
+
} else if (ch === "#" && !inSingle && !inDouble && (i === 0 || /\s/.test(line[i - 1]))) {
|
|
1546
|
+
return line.slice(0, i);
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
return line;
|
|
1550
|
+
}
|
|
1551
|
+
function resolveYamlAnchors(yamlText) {
|
|
1552
|
+
if (!yamlText || !yamlText.trim()) return { error: "Input is empty" };
|
|
1553
|
+
const anchorDefs = [];
|
|
1554
|
+
const referencedNames = /* @__PURE__ */ new Set();
|
|
1555
|
+
let aliasCount = 0;
|
|
1556
|
+
const lines = yamlText.split("\n");
|
|
1557
|
+
for (let i = 0; i < lines.length; i++) {
|
|
1558
|
+
const line = _stripYamlLineComment(lines[i]);
|
|
1559
|
+
const lineNum = i + 1;
|
|
1560
|
+
_YAML_ANCHOR_RE.lastIndex = 0;
|
|
1561
|
+
let m;
|
|
1562
|
+
while ((m = _YAML_ANCHOR_RE.exec(line)) !== null) {
|
|
1563
|
+
anchorDefs.push({ name: m[1], line: lineNum });
|
|
1564
|
+
}
|
|
1565
|
+
_YAML_ALIAS_RE.lastIndex = 0;
|
|
1566
|
+
while ((m = _YAML_ALIAS_RE.exec(line)) !== null) {
|
|
1567
|
+
referencedNames.add(m[1]);
|
|
1568
|
+
aliasCount++;
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
let parsed;
|
|
1572
|
+
try {
|
|
1573
|
+
parsed = yaml__namespace.load(yamlText);
|
|
1574
|
+
} catch (e) {
|
|
1575
|
+
const err = e;
|
|
1576
|
+
return { error: err.reason ?? err.message };
|
|
1577
|
+
}
|
|
1578
|
+
let resolvedYaml;
|
|
1579
|
+
try {
|
|
1580
|
+
resolvedYaml = yaml__namespace.dump(parsed, { noRefs: true, lineWidth: -1 });
|
|
1581
|
+
} catch (e) {
|
|
1582
|
+
return { error: e instanceof Error ? e.message : String(e) };
|
|
1583
|
+
}
|
|
1584
|
+
const anchors = anchorDefs.map((a) => ({
|
|
1585
|
+
name: a.name,
|
|
1586
|
+
line: a.line,
|
|
1587
|
+
referenced: referencedNames.has(a.name)
|
|
1588
|
+
}));
|
|
1589
|
+
const seenAnchorNames = [];
|
|
1590
|
+
for (const a of anchorDefs) {
|
|
1591
|
+
if (!seenAnchorNames.includes(a.name)) seenAnchorNames.push(a.name);
|
|
1592
|
+
}
|
|
1593
|
+
const unusedAnchors = seenAnchorNames.filter((name) => !referencedNames.has(name));
|
|
1594
|
+
return { resolvedYaml, anchors, unusedAnchors, aliasCount };
|
|
1595
|
+
}
|
|
1534
1596
|
|
|
1535
1597
|
exports.convertSubtitles = convertSubtitles;
|
|
1536
1598
|
exports.csvToJson = csvToJson;
|
|
@@ -1567,6 +1629,7 @@ exports.parseIni = parseIni;
|
|
|
1567
1629
|
exports.parseSubtitleTimestamp = parseSubtitleTimestamp;
|
|
1568
1630
|
exports.parseSubtitles = parseSubtitles;
|
|
1569
1631
|
exports.parseXmlToObject = parseXmlToObject;
|
|
1632
|
+
exports.resolveYamlAnchors = resolveYamlAnchors;
|
|
1570
1633
|
exports.serializeSubtitles = serializeSubtitles;
|
|
1571
1634
|
exports.shiftSubtitles = shiftSubtitles;
|
|
1572
1635
|
exports.stringifyIni = stringifyIni;
|
package/dist/tools/data.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as ConvertedSubtitles, a as CsvDuplicateGroup, b as CsvDuplicateOptions, c as CsvDuplicateResult, e as CsvParseResult, f as CsvToSqlOptions, g as CsvToSqlResult, E as EnvDiffError, h as EnvDiffResult, i as EnvEntry, j as EnvParseResult, F as FrontMatterError, k as FrontMatterResult, I as IniSection, M as MarkdownTocEntry, l as MarkdownTocOptions, m as MarkdownTocResult, N as NdjsonLineResult, n as NdjsonValidateResult, P as ParseOptions, o as ParsedIni, p as ParsedSubtitles, S as SubtitleCue, q as SubtitleFormat, T as TomlFormatResult, V as ValidationResult, X as XmlFormatResult, r as XmlToJsonOptions, s as
|
|
1
|
+
export { C as ConvertedSubtitles, a as CsvDuplicateGroup, b as CsvDuplicateOptions, c as CsvDuplicateResult, e as CsvParseResult, f as CsvToSqlOptions, g as CsvToSqlResult, E as EnvDiffError, h as EnvDiffResult, i as EnvEntry, j as EnvParseResult, F as FrontMatterError, k as FrontMatterResult, I as IniSection, M as MarkdownTocEntry, l as MarkdownTocOptions, m as MarkdownTocResult, N as NdjsonLineResult, n as NdjsonValidateResult, P as ParseOptions, o as ParsedIni, p as ParsedSubtitles, S as SubtitleCue, q as SubtitleFormat, T as TomlFormatResult, V as ValidationResult, X as XmlFormatResult, r as XmlToJsonOptions, Y as YamlAnchorInfo, s as YamlAnchorResolveError, t as YamlAnchorResolveResult, u as convertSubtitles, v as csvToJson, w as csvToSqlInsert, x as detectDelimiter, y as detectSubtitleFormat, z as diffEnvExample, A as envToExport, B as envToJson, D as findCsvDuplicateRows, G as formatNdjson, H as formatSubtitleTimestamp, J as formatToml, K as formatXml, L as generateMarkdownToc, O as getSection, Q as getSectionNames, R as getTomlStats, U as getXmlStats, W as getYamlStats, Z as iniToJson, _ as jsonArrayToNdjson, $ as jsonToIni, a0 as jsonToToml, a1 as jsonToXml, a2 as minifyNdjson, a3 as minifyToml, a4 as minifyXml, a5 as ndjsonToJsonArray, a6 as parseCsv, a7 as parseEnv, a8 as parseFrontMatter, a9 as parseIni, aa as parseSubtitleTimestamp, ab as parseSubtitles, ac as parseXmlToObject, ad as resolveYamlAnchors, ae as serializeSubtitles, af as shiftSubtitles, ag as stringifyIni, ah as toCsvString, ai as tomlToJson, aj as validateEnvKey, ak as validateIni, al as validateNdjson, am as validateToml, an as validateXml, ao as validateYaml, ap as xmlToJson } from '../data-BJVJ879p.cjs';
|
package/dist/tools/data.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as ConvertedSubtitles, a as CsvDuplicateGroup, b as CsvDuplicateOptions, c as CsvDuplicateResult, e as CsvParseResult, f as CsvToSqlOptions, g as CsvToSqlResult, E as EnvDiffError, h as EnvDiffResult, i as EnvEntry, j as EnvParseResult, F as FrontMatterError, k as FrontMatterResult, I as IniSection, M as MarkdownTocEntry, l as MarkdownTocOptions, m as MarkdownTocResult, N as NdjsonLineResult, n as NdjsonValidateResult, P as ParseOptions, o as ParsedIni, p as ParsedSubtitles, S as SubtitleCue, q as SubtitleFormat, T as TomlFormatResult, V as ValidationResult, X as XmlFormatResult, r as XmlToJsonOptions, s as
|
|
1
|
+
export { C as ConvertedSubtitles, a as CsvDuplicateGroup, b as CsvDuplicateOptions, c as CsvDuplicateResult, e as CsvParseResult, f as CsvToSqlOptions, g as CsvToSqlResult, E as EnvDiffError, h as EnvDiffResult, i as EnvEntry, j as EnvParseResult, F as FrontMatterError, k as FrontMatterResult, I as IniSection, M as MarkdownTocEntry, l as MarkdownTocOptions, m as MarkdownTocResult, N as NdjsonLineResult, n as NdjsonValidateResult, P as ParseOptions, o as ParsedIni, p as ParsedSubtitles, S as SubtitleCue, q as SubtitleFormat, T as TomlFormatResult, V as ValidationResult, X as XmlFormatResult, r as XmlToJsonOptions, Y as YamlAnchorInfo, s as YamlAnchorResolveError, t as YamlAnchorResolveResult, u as convertSubtitles, v as csvToJson, w as csvToSqlInsert, x as detectDelimiter, y as detectSubtitleFormat, z as diffEnvExample, A as envToExport, B as envToJson, D as findCsvDuplicateRows, G as formatNdjson, H as formatSubtitleTimestamp, J as formatToml, K as formatXml, L as generateMarkdownToc, O as getSection, Q as getSectionNames, R as getTomlStats, U as getXmlStats, W as getYamlStats, Z as iniToJson, _ as jsonArrayToNdjson, $ as jsonToIni, a0 as jsonToToml, a1 as jsonToXml, a2 as minifyNdjson, a3 as minifyToml, a4 as minifyXml, a5 as ndjsonToJsonArray, a6 as parseCsv, a7 as parseEnv, a8 as parseFrontMatter, a9 as parseIni, aa as parseSubtitleTimestamp, ab as parseSubtitles, ac as parseXmlToObject, ad as resolveYamlAnchors, ae as serializeSubtitles, af as shiftSubtitles, ag as stringifyIni, ah as toCsvString, ai as tomlToJson, aj as validateEnvKey, ak as validateIni, al as validateNdjson, am as validateToml, an as validateXml, ao as validateYaml, ap as xmlToJson } from '../data-BJVJ879p.js';
|
package/dist/tools/data.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { 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, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson } from '../chunk-
|
|
1
|
+
export { 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-4TIY6COQ.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
package/dist/tools/media.cjs
CHANGED
|
@@ -1208,7 +1208,93 @@ function parseWebm(bytes) {
|
|
|
1208
1208
|
}
|
|
1209
1209
|
return result;
|
|
1210
1210
|
}
|
|
1211
|
+
function skipGifSubBlocks(bytes, offset) {
|
|
1212
|
+
while (offset < bytes.length) {
|
|
1213
|
+
const len = bytes[offset];
|
|
1214
|
+
offset += 1;
|
|
1215
|
+
if (len === 0) break;
|
|
1216
|
+
offset += len;
|
|
1217
|
+
}
|
|
1218
|
+
return offset;
|
|
1219
|
+
}
|
|
1220
|
+
function inspectGifFrames(bytes) {
|
|
1221
|
+
if (bytes.length < 13) return { error: "File too small to be a valid GIF file" };
|
|
1222
|
+
const signature = Buffer.from(bytes.subarray(0, 6)).toString("ascii");
|
|
1223
|
+
if (signature !== "GIF87a" && signature !== "GIF89a") return { error: "Not a valid GIF file (missing GIF87a/GIF89a signature)" };
|
|
1224
|
+
const version = signature.slice(3);
|
|
1225
|
+
const width = readU16LE(bytes, 6);
|
|
1226
|
+
const height = readU16LE(bytes, 8);
|
|
1227
|
+
const packed = bytes[10];
|
|
1228
|
+
const hasGlobalColorTable = (packed & 128) !== 0;
|
|
1229
|
+
const globalColorTableSize = hasGlobalColorTable ? 2 << (packed & 7) : 0;
|
|
1230
|
+
let offset = 13;
|
|
1231
|
+
if (hasGlobalColorTable) offset += globalColorTableSize * 3;
|
|
1232
|
+
let frameCount = 0;
|
|
1233
|
+
let loopCount = null;
|
|
1234
|
+
let totalDurationMs = 0;
|
|
1235
|
+
let hasTransparency = false;
|
|
1236
|
+
let pendingDelay = 0;
|
|
1237
|
+
while (offset < bytes.length) {
|
|
1238
|
+
const blockType = bytes[offset];
|
|
1239
|
+
if (blockType === 59) break;
|
|
1240
|
+
if (blockType === 33) {
|
|
1241
|
+
const label = bytes[offset + 1];
|
|
1242
|
+
offset += 2;
|
|
1243
|
+
if (label === 249) {
|
|
1244
|
+
const subLen = bytes[offset] ?? 0;
|
|
1245
|
+
if (subLen >= 4) {
|
|
1246
|
+
const flags = bytes[offset + 1];
|
|
1247
|
+
pendingDelay = readU16LE(bytes, offset + 2);
|
|
1248
|
+
if (flags & 1) hasTransparency = true;
|
|
1249
|
+
}
|
|
1250
|
+
offset += 1 + subLen;
|
|
1251
|
+
offset = skipGifSubBlocks(bytes, offset);
|
|
1252
|
+
} else if (label === 255) {
|
|
1253
|
+
const blockSize = bytes[offset] ?? 0;
|
|
1254
|
+
const appId = Buffer.from(bytes.subarray(offset + 1, offset + 1 + Math.min(blockSize, 11))).toString("ascii");
|
|
1255
|
+
offset += 1 + blockSize;
|
|
1256
|
+
if (appId === "NETSCAPE2.0") {
|
|
1257
|
+
const subLen = bytes[offset] ?? 0;
|
|
1258
|
+
if (subLen >= 3 && bytes[offset + 1] === 1) {
|
|
1259
|
+
loopCount = readU16LE(bytes, offset + 2);
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
offset = skipGifSubBlocks(bytes, offset);
|
|
1263
|
+
} else {
|
|
1264
|
+
offset = skipGifSubBlocks(bytes, offset);
|
|
1265
|
+
}
|
|
1266
|
+
} else if (blockType === 44) {
|
|
1267
|
+
if (offset + 10 > bytes.length) return { error: "Truncated image descriptor" };
|
|
1268
|
+
frameCount++;
|
|
1269
|
+
totalDurationMs += pendingDelay * 10;
|
|
1270
|
+
pendingDelay = 0;
|
|
1271
|
+
const packedImg = bytes[offset + 9];
|
|
1272
|
+
const hasLocalColorTable = (packedImg & 128) !== 0;
|
|
1273
|
+
const localColorTableSize = hasLocalColorTable ? 2 << (packedImg & 7) : 0;
|
|
1274
|
+
offset += 10;
|
|
1275
|
+
if (hasLocalColorTable) offset += localColorTableSize * 3;
|
|
1276
|
+
offset += 1;
|
|
1277
|
+
offset = skipGifSubBlocks(bytes, offset);
|
|
1278
|
+
} else {
|
|
1279
|
+
break;
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
if (frameCount === 0) return { error: "No image data blocks found in this GIF file" };
|
|
1283
|
+
return {
|
|
1284
|
+
version,
|
|
1285
|
+
width,
|
|
1286
|
+
height,
|
|
1287
|
+
frameCount,
|
|
1288
|
+
animated: frameCount > 1,
|
|
1289
|
+
loopCount,
|
|
1290
|
+
totalDurationMs,
|
|
1291
|
+
hasGlobalColorTable,
|
|
1292
|
+
globalColorTableSize,
|
|
1293
|
+
hasTransparency
|
|
1294
|
+
};
|
|
1295
|
+
}
|
|
1211
1296
|
|
|
1297
|
+
exports.inspectGifFrames = inspectGifFrames;
|
|
1212
1298
|
exports.readExifData = readExifData;
|
|
1213
1299
|
exports.readFlacInfo = readFlacInfo;
|
|
1214
1300
|
exports.readIcoInfo = readIcoInfo;
|
package/dist/tools/media.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { E as ExifData, a as ExifError, F as FlacInfo, b as FlacInfoError, I as IcoImageEntry,
|
|
1
|
+
export { E as ExifData, a as ExifError, F as FlacInfo, b as FlacInfoError, G as GifInfo, c as GifInfoError, I as IcoImageEntry, d as IcoInfo, e as IcoInfoError, f as Id3Tags, g as Id3TagsError, h as ImageFormat, i as ImageInfo, j as ImageInfoError, P as PdfMetadata, k as PdfMetadataError, l as PdfPageDimension, n as PdfPageDimensionsResult, o as PdfPageOrientation, V as VideoInfo, p as VideoInfoError, W as WavInfo, q as WavInfoError, r as inspectGifFrames, s as readExifData, t as readFlacInfo, u as readIcoInfo, v as readId3Tags, w as readImageInfo, x as readPdfMetadata, y as readPdfPageDimensions, z as readVideoInfo, A as readWavInfo } from '../media-BUvwm4wU.cjs';
|
package/dist/tools/media.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { E as ExifData, a as ExifError, F as FlacInfo, b as FlacInfoError, I as IcoImageEntry,
|
|
1
|
+
export { E as ExifData, a as ExifError, F as FlacInfo, b as FlacInfoError, G as GifInfo, c as GifInfoError, I as IcoImageEntry, d as IcoInfo, e as IcoInfoError, f as Id3Tags, g as Id3TagsError, h as ImageFormat, i as ImageInfo, j as ImageInfoError, P as PdfMetadata, k as PdfMetadataError, l as PdfPageDimension, n as PdfPageDimensionsResult, o as PdfPageOrientation, V as VideoInfo, p as VideoInfoError, W as WavInfo, q as WavInfoError, r as inspectGifFrames, s as readExifData, t as readFlacInfo, u as readIcoInfo, v as readId3Tags, w as readImageInfo, x as readPdfMetadata, y as readPdfPageDimensions, z as readVideoInfo, A as readWavInfo } from '../media-BUvwm4wU.js';
|
package/dist/tools/media.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { readExifData, readFlacInfo, readIcoInfo, readId3Tags, readImageInfo, readPdfMetadata, readPdfPageDimensions, readVideoInfo, readWavInfo } from '../chunk-
|
|
1
|
+
export { inspectGifFrames, readExifData, readFlacInfo, readIcoInfo, readId3Tags, readImageInfo, readPdfMetadata, readPdfPageDimensions, readVideoInfo, readWavInfo } from '../chunk-226EH3ZI.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|