@ooneex/http-header 0.0.1 → 0.3.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/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +5 -4
- package/package.json +13 -6
- package/dist/ooneex-http-header-0.0.1.tgz +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -300,4 +300,4 @@ declare class Header extends ReadonlyHeader implements IHeader {
|
|
|
300
300
|
setLocation(location: string): this;
|
|
301
301
|
setCustom(value: string): this;
|
|
302
302
|
}
|
|
303
|
-
export { UserAgentType, UserAgentOsType, UserAgentEngineType, UserAgentDeviceType, UserAgentCpuType, UserAgentBrowserType, ReadonlyHeader, IUserAgent, IReadonlyHeader, IHeader, HeaderFieldType, Header };
|
|
303
|
+
export { XFrameOptionsType, UserAgentType, UserAgentOsType, UserAgentEngineType, UserAgentDeviceType, UserAgentCpuType, UserAgentBrowserType, ReadonlyHeader, IUserAgent, IReadonlyHeader, IHeader, HeaderFieldType, Header, EXFrameOptions, ECookieSameSite, CookieSameSiteType };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{UAParser as
|
|
1
|
+
import{UAParser as Z}from"ua-parser-js";class W{native;constructor(z){this.native=z}get(z){return this.native.get(z)}has(z){return this.native.has(z)}toJson(){let z={};return this.native.forEach((B,G)=>{z[G]=B}),z}getContentType(){return this.get("Content-Type")}getContentLength(){let z=this.get("Content-Length")||null;return z?Number.parseInt(z,10):0}getCharset(){let z=this.getContentType();if(!z)return null;let B=z.match(/charset *= *(?<charset>[a-z0-9-]+)/i);if(!B)return null;return B[1]?.toUpperCase()||null}getContentDisposition(){return this.get("Content-Disposition")}getAccept(){return this.get("Accept")??null}getLang(){let z=this.get("Accept-Language");if(!z||z.trim()==="")return null;let B=z.split(",").map((Q)=>Q.split(";")[0]?.trim()).filter((Q)=>Boolean(Q))[0];if(!B)return null;let G=B.split("-"),K=G[0];if(!K)return null;if(G.length===1)return{code:K};let N=G[1];return{code:K,...N&&{region:N}}}getAcceptEncoding(){let z=this.get("Accept-Encoding");if(!z)return null;return z.split(",").map((B)=>B.trim())}getHost(){return this.get("Host")}getUserAgent(){let z=this.get("User-Agent")||null;return z?Z(z):null}getReferer(){return this.get("Referer")}getOrigin(){return this.get("Origin")}getAuthorization(){return this.get("Authorization")}getBasicAuth(){let z=this.get("Authorization");if(!z)return null;let B=z.match(/Basic +(?<auth>[^, ]+)/);if(!B)return null;return B[1]||null}getBearerToken(){return(this.get("Authorization")||null)?.match(/Bearer +(?<token>[^, ]+)/)?.[1]||null}getCookies(){let z=this.get("Cookie");if(!z)return null;let B={};return z.split(";").forEach((G)=>{let[K,...N]=G.trim().split("=");if(K&&N.length>0){let Q=N.join("=");B[K.trim()]=decodeURIComponent(Q.trim())}}),Object.keys(B).length>0?B:null}getCookie(z){return this.getCookies()?.[z]||null}getIp(){return this.get("X-Forwarded-For")||this.get("X-Real-IP")||null}getXForwardedFor(){return this.get("X-Forwarded-For")}getXRealIP(){return this.get("X-Real-IP")}getClientIps(){let z=[],B=this.getXForwardedFor();if(B){let N=B.split(",").map((Q)=>Q.trim());z.push(...N)}let G=this.getXRealIP();if(G&&!z.includes(G))z.push(G);let K=this.getIp();if(K&&!z.includes(K))z.push(K);return z.filter((N)=>N&&N.length>0)}getCacheControl(){return this.get("Cache-Control")}getEtag(){return this.get("Etag")}getLastModified(){let z=this.get("Last-Modified");return z?new Date(z):null}getIfModifiedSince(){let z=this.get("If-Modified-Since");return z?new Date(z):null}getIfNoneMatch(){return this.get("If-None-Match")}getAccessControlAllowOrigin(){return this.get("Access-Control-Allow-Origin")}getAccessControlAllowMethods(){let z=this.get("Access-Control-Allow-Methods");if(!z)return null;return z.split(",").map((B)=>B.trim())}getAccessControlAllowHeaders(){let z=this.get("Access-Control-Allow-Headers");if(!z)return null;return z.split(",").map((B)=>B.trim())}getAccessControlAllowCredentials(){let z=this.get("Access-Control-Allow-Credentials");if(!z)return null;return z.toLowerCase()==="true"}getContentSecurityPolicy(){return this.get("Content-Security-Policy")}getStrictTransportSecurity(){return this.get("Strict-Transport-Security")}getXContentTypeOptions(){return this.get("X-Content-Type-Options")}getXFrameOptions(){return this.get("X-Frame-Options")}getXXSSProtection(){return this.get("X-XSS-Protection")}getLocation(){return this.get("Location")}isSecure(){return this.get("X-Forwarded-Proto")==="https"}isAjax(){return this.get("X-Requested-With")?.toLowerCase()==="xmlhttprequest"}isCorsRequest(){return this.has("Origin")}*[Symbol.iterator](){let z=[];this.native.forEach((B,G)=>{z.push([G,B])});for(let B of z)yield B}}class Y extends W{constructor(z){super(z||new Headers)}add(z,B){return this.native.append(z,B),this}remove(z){return this.native.delete(z),this}set(z,B){return this.native.set(z,B),this}contentType(z,B){let G=String(z),K=B?`${G}; charset=${B}`:G;if(this.add("Content-Type",K),G.startsWith("text/")||G==="application/json")this.add("Accept-Charset",B||"utf-8");return this}contentLength(z){return this.add("Content-Length",z.toString()),this}contentDisposition(z){return this.add("Content-Disposition",z)}clearContentType(){return this.remove("Content-Type"),this.remove("Accept-Charset"),this}setJson(z){return this.add("Accept","application/json"),this.contentType("application/json",z),this}setHtml(z){return this.contentType("text/html",z)}setText(z){return this.contentType("text/plain",z)}setForm(z){return this.contentType("application/x-www-form-urlencoded",z)}setFormData(z){return this.contentType("multipart/form-data",z)}setBlobType(z){return this.contentType("application/octet-stream",z)}setAccept(z){return this.add("Accept",z)}setLang(z){return this.set("Accept-Language",z)}setAcceptEncoding(z){return this.add("Accept-Encoding",z.join(", "))}setHost(z){return this.add("Host",z)}setUserAgent(z){return this.add("User-Agent",z)}setReferer(z){return this.add("Referer",z)}setOrigin(z){return this.add("Origin",z)}setAuthorization(z){return this.add("Authorization",z)}setBasicAuth(z){return this.add("Authorization",`Basic ${z}`)}setBearerToken(z){return this.add("Authorization",`Bearer ${z}`)}setCookie(z,B,G){let K=`${z}=${B}`;if(G?.maxAge!==void 0)K+=`; Max-Age=${G.maxAge}`;if(G?.expires)K+=`; Expires=${G.expires.toUTCString()}`;if(G?.path)K+=`; Path=${G.path}`;if(G?.domain)K+=`; Domain=${G.domain}`;if(G?.secure)K+="; Secure";if(G?.httpOnly)K+="; HttpOnly";if(G?.sameSite)K+=`; SameSite=${G.sameSite}`;return this.add("Set-Cookie",K)}setCookies(z){return z.forEach((B)=>{this.setCookie(B.name,B.value,B.options)}),this}addCookie(z,B,G){return this.setCookie(z,B,G)}removeCookie(z,B){let G=new Date(0);return this.setCookie(z,"",{...B,expires:G,maxAge:0})}setCacheControl(z){return this.add("Cache-Control",z)}setEtag(z){return this.add("Etag",z)}setLastModified(z){return this.add("Last-Modified",z.toUTCString())}setIfModifiedSince(z){return this.add("If-Modified-Since",z.toUTCString())}setAccessControlAllowOrigin(z){return this.add("Access-Control-Allow-Origin",z)}setAccessControlAllowMethods(z){let B=z.join(", ");return this.add("Access-Control-Allow-Methods",B)}setAccessControlAllowHeaders(z){let B=z.join(", ");return this.add("Access-Control-Allow-Headers",B)}setAccessControlAllowCredentials(z){return this.add("Access-Control-Allow-Credentials",z.toString())}setContentSecurityPolicy(z){return this.add("Content-Security-Policy",z)}setStrictTransportSecurity(z,B=!1,G=!1){let K=`max-age=${z}`;if(B)K+="; includeSubDomains";if(G)K+="; preload";return this.add("Strict-Transport-Security",K)}setXContentTypeOptions(z="nosniff"){return this.add("X-Content-Type-Options",z)}setXFrameOptions(z){return this.add("X-Frame-Options",z)}setXXSSProtection(z=!0,B){let G=z?"1":"0";if(z&&B)G+=`; mode=${B}`;return this.add("X-XSS-Protection",G)}setLocation(z){return this.add("Location",z)}setCustom(z){return this.add("X-Custom",z)}}var $;((K)=>{K.STRICT="Strict";K.LAX="Lax";K.NONE="None"})($||={});var j;((G)=>{G.DENY="DENY";G.SAMEORIGIN="SAMEORIGIN"})(j||={});export{W as ReadonlyHeader,Y as Header,j as EXFrameOptions,$ as ECookieSameSite};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
3
|
+
//# debugId=E4D65FB11A59392764756E2164756E21
|
package/dist/index.js.map
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["src/ReadonlyHeader.ts", "src/Header.ts"],
|
|
3
|
+
"sources": ["src/ReadonlyHeader.ts", "src/Header.ts", "src/types.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import type { MimeType } from \"@ooneex/http-mimes\";\nimport type { CharsetType, EncodingType, HttpMethodType } from \"@ooneex/types\";\nimport { UAParser } from \"ua-parser-js\";\nimport type { HeaderFieldType, IReadonlyHeader, IUserAgent } from \"./types\";\n\nexport class ReadonlyHeader implements IReadonlyHeader {\n constructor(public readonly native: Headers) {}\n\n public get(name: HeaderFieldType): string | null {\n return this.native.get(name);\n }\n\n public has(name: HeaderFieldType): boolean {\n return this.native.has(name);\n }\n\n public toJson(): Record<string, string> {\n const headers: Record<string, string> = {};\n\n this.native.forEach((value, key) => {\n headers[key] = value;\n });\n\n return headers;\n }\n\n public getContentType(): MimeType | \"*/*\" | null {\n return this.get(\"Content-Type\") as MimeType | \"*/*\" | null;\n }\n\n public getContentLength(): number {\n const length = this.get(\"Content-Length\") || null;\n\n return length ? Number.parseInt(length, 10) : 0;\n }\n\n public getCharset(): CharsetType | null {\n const contentType = this.getContentType();\n\n if (!contentType) {\n return null;\n }\n\n const match = (contentType as string).match(/charset *= *(?<charset>[a-z0-9-]+)/i);\n\n if (!match) {\n return null;\n }\n\n return (match[1]?.toUpperCase() || null) as CharsetType | null;\n }\n\n public getContentDisposition(): string | null {\n return this.get(\"Content-Disposition\");\n }\n\n // Content negotiation\n public getAccept(): MimeType | \"*/*\" | null {\n return (this.get(\"Accept\") ?? null) as MimeType | \"*/*\" | null;\n }\n\n public getLang(): { code: string; region?: string } | null {\n const acceptLanguage = this.get(\"Accept-Language\");\n\n if (!acceptLanguage || acceptLanguage.trim() === \"\") {\n return null;\n }\n\n // Parse the first language from Accept-Language header (same logic as getAcceptLanguage)\n const firstLang = acceptLanguage\n .split(\",\")\n .map((lang) => lang.split(\";\")[0]?.trim())\n .filter((lang): lang is string => Boolean(lang))[0];\n\n if (!firstLang) {\n return null;\n }\n\n const parts = firstLang.split(\"-\");\n\n const code = parts[0];\n if (!code) {\n return null;\n }\n\n if (parts.length === 1) {\n return { code };\n }\n\n const region = parts[1];\n return {\n code,\n ...(region && { region }),\n };\n }\n\n public getAcceptEncoding(): EncodingType[] | null {\n const encoding = this.get(\"Accept-Encoding\");\n\n if (!encoding) {\n return null;\n }\n\n return encoding.split(\",\").map((val) => val.trim()) as EncodingType[] | null;\n }\n\n public getHost(): string | null {\n return this.get(\"Host\");\n }\n\n public getUserAgent(): IUserAgent | null {\n const userAgent = this.get(\"User-Agent\") || null;\n\n return userAgent ? UAParser(userAgent) : null;\n }\n\n public getReferer(): string | null {\n return this.get(\"Referer\");\n }\n\n public getOrigin(): string | null {\n return this.get(\"Origin\");\n }\n\n // Authentication\n public getAuthorization(): string | null {\n return this.get(\"Authorization\");\n }\n\n public getBasicAuth(): string | null {\n const auth = this.get(\"Authorization\");\n\n if (!auth) {\n return null;\n }\n\n const match = auth.match(/Basic +(?<auth>[^, ]+)/);\n\n if (!match) {\n return null;\n }\n\n return match[1] || null;\n }\n\n public getBearerToken(): string | null {\n const token = this.get(\"Authorization\") || null;\n\n const match = token?.match(/Bearer +(?<token>[^, ]+)/);\n\n return match?.[1] || null;\n }\n\n public getCookies(): Record<string, string> | null {\n const cookieHeader = this.get(\"Cookie\");\n\n if (!cookieHeader) {\n return null;\n }\n\n const cookies: Record<string, string> = {};\n\n cookieHeader.split(\";\").forEach((cookie) => {\n const [key, ...valueParts] = cookie.trim().split(\"=\");\n if (key && valueParts.length > 0) {\n const value = valueParts.join(\"=\");\n cookies[key.trim()] = decodeURIComponent(value.trim());\n }\n });\n\n return Object.keys(cookies).length > 0 ? cookies : null;\n }\n\n public getCookie(name: string): string | null {\n const cookies = this.getCookies();\n\n return cookies?.[name] || null;\n }\n\n public getIp(): string | null {\n return this.get(\"X-Forwarded-For\") || this.get(\"X-Real-IP\") || null;\n }\n\n public getXForwardedFor(): string | null {\n return this.get(\"X-Forwarded-For\");\n }\n\n public getXRealIP(): string | null {\n return this.get(\"X-Real-IP\");\n }\n\n public getClientIps(): string[] {\n const ips: string[] = [];\n\n const xForwardedFor = this.getXForwardedFor();\n if (xForwardedFor) {\n const forwardedIps = xForwardedFor.split(\",\").map((ip) => ip.trim());\n ips.push(...forwardedIps);\n }\n\n const xRealIp = this.getXRealIP();\n if (xRealIp && !ips.includes(xRealIp)) {\n ips.push(xRealIp);\n }\n\n const ip = this.getIp();\n if (ip && !ips.includes(ip)) {\n ips.push(ip);\n }\n\n return ips.filter((ip) => ip && ip.length > 0);\n }\n\n public getCacheControl(): string | null {\n return this.get(\"Cache-Control\");\n }\n\n public getEtag(): string | null {\n return this.get(\"Etag\");\n }\n\n public getLastModified(): Date | null {\n const lastModified = this.get(\"Last-Modified\");\n return lastModified ? new Date(lastModified) : null;\n }\n\n public getIfModifiedSince(): Date | null {\n const ifModifiedSince = this.get(\"If-Modified-Since\");\n return ifModifiedSince ? new Date(ifModifiedSince) : null;\n }\n\n public getIfNoneMatch(): string | null {\n return this.get(\"If-None-Match\");\n }\n\n public getAccessControlAllowOrigin(): string | null {\n return this.get(\"Access-Control-Allow-Origin\");\n }\n\n public getAccessControlAllowMethods(): HttpMethodType[] | null {\n const methods = this.get(\"Access-Control-Allow-Methods\");\n\n if (!methods) {\n return null;\n }\n\n return methods.split(\",\").map((method) => method.trim()) as HttpMethodType[];\n }\n\n public getAccessControlAllowHeaders(): string[] | null {\n const headers = this.get(\"Access-Control-Allow-Headers\");\n\n if (!headers) {\n return null;\n }\n\n return headers.split(\",\").map((header) => header.trim());\n }\n\n public getAccessControlAllowCredentials(): boolean | null {\n const credentials = this.get(\"Access-Control-Allow-Credentials\");\n\n if (!credentials) {\n return null;\n }\n\n return credentials.toLowerCase() === \"true\";\n }\n\n public getContentSecurityPolicy(): string | null {\n return this.get(\"Content-Security-Policy\");\n }\n\n public getStrictTransportSecurity(): string | null {\n return this.get(\"Strict-Transport-Security\");\n }\n\n public getXContentTypeOptions(): string | null {\n return this.get(\"X-Content-Type-Options\");\n }\n\n public getXFrameOptions(): string | null {\n return this.get(\"X-Frame-Options\");\n }\n\n public getXXSSProtection(): string | null {\n return this.get(\"X-XSS-Protection\");\n }\n\n public getLocation(): string | null {\n return this.get(\"Location\");\n }\n\n public isSecure(): boolean {\n const proto = this.get(\"X-Forwarded-Proto\");\n return proto === \"https\";\n }\n\n public isAjax(): boolean {\n return this.get(\"X-Requested-With\")?.toLowerCase() === \"xmlhttprequest\";\n }\n\n public isCorsRequest(): boolean {\n return this.has(\"Origin\");\n }\n\n public *[Symbol.iterator](): IterableIterator<[HeaderFieldType, string]> {\n const entries: [HeaderFieldType, string][] = [];\n this.native.forEach((value, key) => {\n entries.push([key as HeaderFieldType, value]);\n });\n for (const entry of entries) {\n yield entry;\n }\n }\n}\n",
|
|
6
|
-
"import type { MimeType } from \"@ooneex/http-mimes\";\nimport type { CharsetType, EncodingType, HttpMethodType } from \"@ooneex/types\";\nimport { ReadonlyHeader } from \"./ReadonlyHeader\";\nimport type { HeaderFieldType, IHeader } from \"./types\";\n\nexport class Header extends ReadonlyHeader implements IHeader {\n constructor(headers?: Headers) {\n super(headers || new Headers());\n }\n\n // Core methods\n public add(name: HeaderFieldType, value: string): this {\n this.native.append(name, value);\n return this;\n }\n\n public remove(name: HeaderFieldType): this {\n this.native.delete(name);\n return this;\n }\n\n public set(name: HeaderFieldType, value: string): this {\n this.native.set(name, value);\n return this;\n }\n\n // Content handling\n public contentType(type: MimeType, charset?: CharsetType): this {\n const typeStr = String(type);\n const value = charset ? `${typeStr}; charset=${charset}` : typeStr;\n this.add(\"Content-Type\", value);\n\n if (typeStr.startsWith(\"text/\") || typeStr === \"application/json\") {\n this.add(\"Accept-Charset\", charset || \"utf-8\");\n }\n\n return this;\n }\n\n public contentLength(length: number): this {\n this.add(\"Content-Length\", length.toString());\n return this;\n }\n\n public contentDisposition(value: string): this {\n return this.add(\"Content-Disposition\", value);\n }\n\n public clearContentType(): this {\n this.remove(\"Content-Type\");\n this.remove(\"Accept-Charset\");\n return this;\n }\n\n // Content type convenience methods\n public setJson(charset?: CharsetType): this {\n this.add(\"Accept\", \"application/json\");\n this.contentType(\"application/json\", charset);\n return this;\n }\n\n public setHtml(charset?: CharsetType): this {\n return this.contentType(\"text/html\", charset);\n }\n\n public setText(charset?: CharsetType): this {\n return this.contentType(\"text/plain\", charset);\n }\n\n public setForm(charset?: CharsetType): this {\n return this.contentType(\"application/x-www-form-urlencoded\", charset);\n }\n\n public setFormData(charset?: CharsetType): this {\n return this.contentType(\"multipart/form-data\", charset);\n }\n\n public setBlobType(charset?: CharsetType): this {\n return this.contentType(\"application/octet-stream\", charset);\n }\n\n // Content negotiation\n public setAccept(mimeType: MimeType): this {\n return this.add(\"Accept\", mimeType as string);\n }\n\n public setLang(language: string): this {\n return this.set(\"Accept-Language\", language);\n }\n\n public setAcceptEncoding(encodings: EncodingType[]): this {\n return this.add(\"Accept-Encoding\", encodings.join(\", \"));\n }\n\n // Request information\n public setHost(host: string): this {\n return this.add(\"Host\", host);\n }\n\n public setUserAgent(userAgent: string): this {\n return this.add(\"User-Agent\", userAgent);\n }\n\n public setReferer(referer: string): this {\n return this.add(\"Referer\", referer);\n }\n\n public setOrigin(origin: string): this {\n return this.add(\"Origin\", origin);\n }\n\n // Authentication\n public setAuthorization(value: string): this {\n return this.add(\"Authorization\", value);\n }\n\n public setBasicAuth(token: string): this {\n return this.add(\"Authorization\", `Basic ${token}`);\n }\n\n public setBearerToken(token: string): this {\n return this.add(\"Authorization\", `Bearer ${token}`);\n }\n\n // Cookies\n public setCookie(\n name: string,\n value: string,\n options?: {\n domain?: string;\n path?: string;\n expires?: Date;\n maxAge?: number;\n secure?: boolean;\n httpOnly?: boolean;\n sameSite?: \"Strict\" | \"Lax\" | \"None\";\n },\n ): this {\n let cookieValue = `${name}=${value}`;\n\n if (options?.maxAge !== undefined) {\n cookieValue += `; Max-Age=${options.maxAge}`;\n }\n if (options?.expires) {\n cookieValue += `; Expires=${options.expires.toUTCString()}`;\n }\n if (options?.path) cookieValue += `; Path=${options.path}`;\n if (options?.domain) cookieValue += `; Domain=${options.domain}`;\n if (options?.secure) cookieValue += \"; Secure\";\n if (options?.httpOnly) cookieValue += \"; HttpOnly\";\n if (options?.sameSite) cookieValue += `; SameSite=${options.sameSite}`;\n\n return this.add(\"Set-Cookie\", cookieValue);\n }\n\n public setCookies(\n cookies: {\n name: string;\n value: string;\n options?: {\n domain?: string;\n path?: string;\n expires?: Date;\n maxAge?: number;\n secure?: boolean;\n httpOnly?: boolean;\n sameSite?: \"Strict\" | \"Lax\" | \"None\";\n };\n }[],\n ): this {\n cookies.forEach((cookie) => {\n this.setCookie(cookie.name, cookie.value, cookie.options);\n });\n return this;\n }\n\n public addCookie(\n name: string,\n value: string,\n options?: {\n domain?: string;\n path?: string;\n expires?: Date;\n maxAge?: number;\n secure?: boolean;\n httpOnly?: boolean;\n sameSite?: \"Strict\" | \"Lax\" | \"None\";\n },\n ): this {\n return this.setCookie(name, value, options);\n }\n\n public removeCookie(\n name: string,\n options?: {\n domain?: string;\n path?: string;\n },\n ): this {\n const pastDate = new Date(0); // January 1, 1970\n return this.setCookie(name, \"\", {\n ...options,\n expires: pastDate,\n maxAge: 0,\n });\n }\n\n // Caching\n public setCacheControl(value: string): this {\n return this.add(\"Cache-Control\", value);\n }\n\n public setEtag(value: string): this {\n return this.add(\"Etag\", value);\n }\n\n public setLastModified(date: Date): this {\n return this.add(\"Last-Modified\", date.toUTCString());\n }\n\n public setIfModifiedSince(date: Date): this {\n return this.add(\"If-Modified-Since\", date.toUTCString());\n }\n\n // CORS\n public setAccessControlAllowOrigin(origin: string): this {\n return this.add(\"Access-Control-Allow-Origin\", origin);\n }\n\n public setAccessControlAllowMethods(methods: HttpMethodType[]): this {\n const value = methods.join(\", \");\n return this.add(\"Access-Control-Allow-Methods\", value);\n }\n\n public setAccessControlAllowHeaders(headers: string[]): this {\n const value = headers.join(\", \");\n return this.add(\"Access-Control-Allow-Headers\", value);\n }\n\n public setAccessControlAllowCredentials(allow: boolean): this {\n return this.add(\"Access-Control-Allow-Credentials\", allow.toString());\n }\n\n // Security headers\n public setContentSecurityPolicy(policy: string): this {\n return this.add(\"Content-Security-Policy\", policy);\n }\n\n public setStrictTransportSecurity(maxAge: number, includeSubDomains = false, preload = false): this {\n let value = `max-age=${maxAge}`;\n if (includeSubDomains) value += \"; includeSubDomains\";\n if (preload) value += \"; preload\";\n return this.add(\"Strict-Transport-Security\", value);\n }\n\n public setXContentTypeOptions(value = \"nosniff\"): this {\n return this.add(\"X-Content-Type-Options\", value);\n }\n\n public setXFrameOptions(value: \"DENY\" | \"SAMEORIGIN\" | string): this {\n return this.add(\"X-Frame-Options\", value);\n }\n\n public setXXSSProtection(enabled = true, mode?: string): this {\n let value = enabled ? \"1\" : \"0\";\n if (enabled && mode) value += `; mode=${mode}`;\n return this.add(\"X-XSS-Protection\", value);\n }\n\n // Redirects\n public setLocation(location: string): this {\n return this.add(\"Location\", location);\n }\n\n // Utility\n public setCustom(value: string): this {\n return this.add(\"X-Custom\", value);\n }\n}\n"
|
|
6
|
+
"import type { MimeType } from \"@ooneex/http-mimes\";\nimport type { CharsetType, EncodingType, HttpMethodType } from \"@ooneex/types\";\nimport { ReadonlyHeader } from \"./ReadonlyHeader\";\nimport type { HeaderFieldType, IHeader } from \"./types\";\n\nexport class Header extends ReadonlyHeader implements IHeader {\n constructor(headers?: Headers) {\n super(headers || new Headers());\n }\n\n // Core methods\n public add(name: HeaderFieldType, value: string): this {\n this.native.append(name, value);\n return this;\n }\n\n public remove(name: HeaderFieldType): this {\n this.native.delete(name);\n return this;\n }\n\n public set(name: HeaderFieldType, value: string): this {\n this.native.set(name, value);\n return this;\n }\n\n // Content handling\n public contentType(type: MimeType, charset?: CharsetType): this {\n const typeStr = String(type);\n const value = charset ? `${typeStr}; charset=${charset}` : typeStr;\n this.add(\"Content-Type\", value);\n\n if (typeStr.startsWith(\"text/\") || typeStr === \"application/json\") {\n this.add(\"Accept-Charset\", charset || \"utf-8\");\n }\n\n return this;\n }\n\n public contentLength(length: number): this {\n this.add(\"Content-Length\", length.toString());\n return this;\n }\n\n public contentDisposition(value: string): this {\n return this.add(\"Content-Disposition\", value);\n }\n\n public clearContentType(): this {\n this.remove(\"Content-Type\");\n this.remove(\"Accept-Charset\");\n return this;\n }\n\n // Content type convenience methods\n public setJson(charset?: CharsetType): this {\n this.add(\"Accept\", \"application/json\");\n this.contentType(\"application/json\", charset);\n return this;\n }\n\n public setHtml(charset?: CharsetType): this {\n return this.contentType(\"text/html\", charset);\n }\n\n public setText(charset?: CharsetType): this {\n return this.contentType(\"text/plain\", charset);\n }\n\n public setForm(charset?: CharsetType): this {\n return this.contentType(\"application/x-www-form-urlencoded\", charset);\n }\n\n public setFormData(charset?: CharsetType): this {\n return this.contentType(\"multipart/form-data\", charset);\n }\n\n public setBlobType(charset?: CharsetType): this {\n return this.contentType(\"application/octet-stream\", charset);\n }\n\n // Content negotiation\n public setAccept(mimeType: MimeType): this {\n return this.add(\"Accept\", mimeType as string);\n }\n\n public setLang(language: string): this {\n return this.set(\"Accept-Language\", language);\n }\n\n public setAcceptEncoding(encodings: EncodingType[]): this {\n return this.add(\"Accept-Encoding\", encodings.join(\", \"));\n }\n\n // Request information\n public setHost(host: string): this {\n return this.add(\"Host\", host);\n }\n\n public setUserAgent(userAgent: string): this {\n return this.add(\"User-Agent\", userAgent);\n }\n\n public setReferer(referer: string): this {\n return this.add(\"Referer\", referer);\n }\n\n public setOrigin(origin: string): this {\n return this.add(\"Origin\", origin);\n }\n\n // Authentication\n public setAuthorization(value: string): this {\n return this.add(\"Authorization\", value);\n }\n\n public setBasicAuth(token: string): this {\n return this.add(\"Authorization\", `Basic ${token}`);\n }\n\n public setBearerToken(token: string): this {\n return this.add(\"Authorization\", `Bearer ${token}`);\n }\n\n // Cookies\n public setCookie(\n name: string,\n value: string,\n options?: {\n domain?: string;\n path?: string;\n expires?: Date;\n maxAge?: number;\n secure?: boolean;\n httpOnly?: boolean;\n sameSite?: \"Strict\" | \"Lax\" | \"None\";\n },\n ): this {\n let cookieValue = `${name}=${value}`;\n\n if (options?.maxAge !== undefined) {\n cookieValue += `; Max-Age=${options.maxAge}`;\n }\n if (options?.expires) {\n cookieValue += `; Expires=${options.expires.toUTCString()}`;\n }\n if (options?.path) cookieValue += `; Path=${options.path}`;\n if (options?.domain) cookieValue += `; Domain=${options.domain}`;\n if (options?.secure) cookieValue += \"; Secure\";\n if (options?.httpOnly) cookieValue += \"; HttpOnly\";\n if (options?.sameSite) cookieValue += `; SameSite=${options.sameSite}`;\n\n return this.add(\"Set-Cookie\", cookieValue);\n }\n\n public setCookies(\n cookies: {\n name: string;\n value: string;\n options?: {\n domain?: string;\n path?: string;\n expires?: Date;\n maxAge?: number;\n secure?: boolean;\n httpOnly?: boolean;\n sameSite?: \"Strict\" | \"Lax\" | \"None\";\n };\n }[],\n ): this {\n cookies.forEach((cookie) => {\n this.setCookie(cookie.name, cookie.value, cookie.options);\n });\n return this;\n }\n\n public addCookie(\n name: string,\n value: string,\n options?: {\n domain?: string;\n path?: string;\n expires?: Date;\n maxAge?: number;\n secure?: boolean;\n httpOnly?: boolean;\n sameSite?: \"Strict\" | \"Lax\" | \"None\";\n },\n ): this {\n return this.setCookie(name, value, options);\n }\n\n public removeCookie(\n name: string,\n options?: {\n domain?: string;\n path?: string;\n },\n ): this {\n const pastDate = new Date(0); // January 1, 1970\n return this.setCookie(name, \"\", {\n ...options,\n expires: pastDate,\n maxAge: 0,\n });\n }\n\n // Caching\n public setCacheControl(value: string): this {\n return this.add(\"Cache-Control\", value);\n }\n\n public setEtag(value: string): this {\n return this.add(\"Etag\", value);\n }\n\n public setLastModified(date: Date): this {\n return this.add(\"Last-Modified\", date.toUTCString());\n }\n\n public setIfModifiedSince(date: Date): this {\n return this.add(\"If-Modified-Since\", date.toUTCString());\n }\n\n // CORS\n public setAccessControlAllowOrigin(origin: string): this {\n return this.add(\"Access-Control-Allow-Origin\", origin);\n }\n\n public setAccessControlAllowMethods(methods: HttpMethodType[]): this {\n const value = methods.join(\", \");\n return this.add(\"Access-Control-Allow-Methods\", value);\n }\n\n public setAccessControlAllowHeaders(headers: string[]): this {\n const value = headers.join(\", \");\n return this.add(\"Access-Control-Allow-Headers\", value);\n }\n\n public setAccessControlAllowCredentials(allow: boolean): this {\n return this.add(\"Access-Control-Allow-Credentials\", allow.toString());\n }\n\n // Security headers\n public setContentSecurityPolicy(policy: string): this {\n return this.add(\"Content-Security-Policy\", policy);\n }\n\n public setStrictTransportSecurity(maxAge: number, includeSubDomains = false, preload = false): this {\n let value = `max-age=${maxAge}`;\n if (includeSubDomains) value += \"; includeSubDomains\";\n if (preload) value += \"; preload\";\n return this.add(\"Strict-Transport-Security\", value);\n }\n\n public setXContentTypeOptions(value = \"nosniff\"): this {\n return this.add(\"X-Content-Type-Options\", value);\n }\n\n public setXFrameOptions(value: \"DENY\" | \"SAMEORIGIN\" | string): this {\n return this.add(\"X-Frame-Options\", value);\n }\n\n public setXXSSProtection(enabled = true, mode?: string): this {\n let value = enabled ? \"1\" : \"0\";\n if (enabled && mode) value += `; mode=${mode}`;\n return this.add(\"X-XSS-Protection\", value);\n }\n\n // Redirects\n public setLocation(location: string): this {\n return this.add(\"Location\", location);\n }\n\n // Utility\n public setCustom(value: string): this {\n return this.add(\"X-Custom\", value);\n }\n}\n",
|
|
7
|
+
"import type { MimeType } from \"@ooneex/http-mimes\";\nimport type { CharsetType, EncodingType, HttpMethodType } from \"@ooneex/types\";\nimport type { HEADERS } from \"./constants\";\n\nexport enum ECookieSameSite {\n STRICT = \"Strict\",\n LAX = \"Lax\",\n NONE = \"None\",\n}\n\nexport enum EXFrameOptions {\n DENY = \"DENY\",\n SAMEORIGIN = \"SAMEORIGIN\",\n}\n\nexport type CookieSameSiteType = `${ECookieSameSite}`;\nexport type XFrameOptionsType = `${EXFrameOptions}` | string;\n\nexport type HeaderFieldType = (typeof HEADERS)[number] | `X-Custom-${string}` | \"X-Real-IP\";\n\nexport type UserAgentType = {\n browser: {\n name?: string;\n version?: string;\n major?: string;\n };\n engine: {\n name?: string;\n version?: string;\n };\n os: {\n name?: string;\n version?: string;\n };\n device: {\n vendor?: string;\n model?: string;\n type?: string;\n };\n cpu: {\n architecture?: string;\n };\n};\n\nexport type UserAgentBrowserType = UserAgentType[\"browser\"];\nexport type UserAgentEngineType = UserAgentType[\"engine\"];\nexport type UserAgentOsType = UserAgentType[\"os\"];\nexport type UserAgentDeviceType = UserAgentType[\"device\"];\nexport type UserAgentCpuType = UserAgentType[\"cpu\"];\n\nexport interface IUserAgent {\n readonly browser: UserAgentBrowserType;\n readonly engine: UserAgentEngineType;\n readonly os: UserAgentOsType;\n readonly device: UserAgentDeviceType;\n readonly cpu: UserAgentCpuType;\n}\n\nexport interface IHeader extends IReadonlyHeader {\n readonly native: Headers;\n\n // Core methods\n add: (name: HeaderFieldType, value: string) => IHeader;\n remove: (name: HeaderFieldType) => IHeader;\n set: (name: HeaderFieldType, value: string) => IHeader;\n\n // Content handling\n contentType: (value: MimeType, charset?: CharsetType) => IHeader;\n contentLength: (length: number) => IHeader;\n contentDisposition: (value: string) => IHeader;\n\n // Content type convenience methods\n setJson: (charset?: CharsetType) => IHeader;\n setHtml: (charset?: CharsetType) => IHeader;\n setText: (charset?: CharsetType) => IHeader;\n setForm: (charset?: CharsetType) => IHeader;\n setFormData: (charset?: CharsetType) => IHeader;\n setBlobType: (charset?: CharsetType) => IHeader;\n\n // Content negotiation\n setAccept: (mimeType: MimeType) => IHeader;\n setLang: (language: string) => IHeader;\n setAcceptEncoding: (encodings: EncodingType[]) => IHeader;\n\n // Request information\n setHost: (host: string) => IHeader;\n setUserAgent: (userAgent: string) => IHeader;\n setReferer: (referer: string) => IHeader;\n setOrigin: (origin: string) => IHeader;\n\n // Authentication\n setAuthorization: (value: string) => IHeader;\n setBasicAuth: (token: string) => IHeader;\n setBearerToken: (token: string) => IHeader;\n\n // Cookies\n setCookie: (\n name: string,\n value: string,\n options?: {\n domain?: string;\n path?: string;\n expires?: Date;\n maxAge?: number;\n secure?: boolean;\n httpOnly?: boolean;\n sameSite?: CookieSameSiteType;\n },\n ) => IHeader;\n\n setCookies: (\n cookies: Array<{\n name: string;\n value: string;\n options?: {\n domain?: string;\n path?: string;\n expires?: Date;\n maxAge?: number;\n secure?: boolean;\n httpOnly?: boolean;\n sameSite?: CookieSameSiteType;\n };\n }>,\n ) => IHeader;\n\n addCookie: (\n name: string,\n value: string,\n options?: {\n domain?: string;\n path?: string;\n expires?: Date;\n maxAge?: number;\n secure?: boolean;\n httpOnly?: boolean;\n sameSite?: CookieSameSiteType;\n },\n ) => IHeader;\n\n removeCookie: (\n name: string,\n options?: {\n domain?: string;\n path?: string;\n },\n ) => IHeader;\n\n // Caching\n setCacheControl: (value: string) => IHeader;\n setEtag: (value: string) => IHeader;\n setLastModified: (date: Date) => IHeader;\n setIfModifiedSince: (date: Date) => IHeader;\n\n // CORS\n setAccessControlAllowOrigin: (origin: string) => IHeader;\n setAccessControlAllowMethods: (methods: HttpMethodType[]) => IHeader;\n setAccessControlAllowHeaders: (headers: string[]) => IHeader;\n setAccessControlAllowCredentials: (allow: boolean) => IHeader;\n\n // Security headers\n setContentSecurityPolicy: (policy: string) => IHeader;\n setStrictTransportSecurity: (maxAge: number, includeSubDomains?: boolean, preload?: boolean) => IHeader;\n setXContentTypeOptions: (value?: string) => IHeader;\n setXFrameOptions: (value: XFrameOptionsType) => IHeader;\n setXXSSProtection: (enabled?: boolean, mode?: string) => IHeader;\n\n // Redirects\n setLocation: (location: string) => IHeader;\n\n // Utility\n setCustom: (value: string) => IHeader;\n}\n\nexport interface IReadonlyHeader {\n readonly native: Headers;\n\n // Core methods\n get: (name: HeaderFieldType) => string | null;\n has: (name: HeaderFieldType) => boolean;\n toJson: () => Record<string, string>;\n\n // Content handling\n getContentType: () => MimeType | \"*/*\" | null;\n getContentLength: () => number;\n getCharset: () => CharsetType | null;\n getContentDisposition: () => string | null;\n\n // Content negotiation\n getAccept: () => MimeType | \"*/*\" | null;\n getLang: () => { code: string; region?: string } | null;\n getAcceptEncoding: () => EncodingType[] | null;\n\n // Request information\n getHost: () => string | null;\n getUserAgent: () => IUserAgent | null;\n getReferer: () => string | null;\n getOrigin: () => string | null;\n\n // Authentication\n getAuthorization: () => string | null;\n getBasicAuth: () => string | null;\n getBearerToken: () => string | null;\n\n // Cookies\n getCookies: () => Record<string, string> | null;\n getCookie: (name: string) => string | null;\n\n // Client IP detection\n getIp: () => string | null;\n getXForwardedFor: () => string | null;\n getXRealIP: () => string | null;\n getClientIps: () => string[];\n\n // Caching\n getCacheControl: () => string | null;\n getEtag: () => string | null;\n getLastModified: () => Date | null;\n getIfModifiedSince: () => Date | null;\n getIfNoneMatch: () => string | null;\n\n // CORS\n getAccessControlAllowOrigin: () => string | null;\n getAccessControlAllowMethods: () => HttpMethodType[] | null;\n getAccessControlAllowHeaders: () => string[] | null;\n getAccessControlAllowCredentials: () => boolean | null;\n\n // Security headers\n getContentSecurityPolicy: () => string | null;\n getStrictTransportSecurity: () => string | null;\n getXContentTypeOptions: () => string | null;\n getXFrameOptions: () => string | null;\n getXXSSProtection: () => string | null;\n\n // Redirects\n getLocation: () => string | null;\n\n // Request type detection\n isSecure: () => boolean;\n isAjax: () => boolean;\n isCorsRequest: () => boolean;\n\n // Iterator support\n [Symbol.iterator](): IterableIterator<[HeaderFieldType, string]>;\n}\n"
|
|
7
8
|
],
|
|
8
|
-
"mappings": "AAEA,mBAAS,qBAGF,MAAM,CAA0C,CACzB,OAA5B,WAAW,CAAiB,EAAiB,CAAjB,cAErB,GAAG,CAAC,EAAsC,CAC/C,OAAO,KAAK,OAAO,IAAI,CAAI,EAGtB,GAAG,CAAC,EAAgC,CACzC,OAAO,KAAK,OAAO,IAAI,CAAI,EAGtB,MAAM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AAK,IAAL,CACL,OAAO,OACP,aAAa,eAFH",
|
|
10
|
+
"debugId": "E4D65FB11A59392764756E2164756E21",
|
|
10
11
|
"names": []
|
|
11
12
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ooneex/http-header",
|
|
3
|
-
"description": "",
|
|
4
|
-
"version": "0.0
|
|
3
|
+
"description": "HTTP header parsing with user agent detection, browser identification, and device information extraction",
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -25,9 +25,7 @@
|
|
|
25
25
|
"test": "bun test tests",
|
|
26
26
|
"build": "bunup",
|
|
27
27
|
"lint": "tsgo --noEmit && bunx biome lint",
|
|
28
|
-
"publish
|
|
29
|
-
"publish:pack": "bun pm pack --destination ./dist",
|
|
30
|
-
"publish:dry": "bun publish --dry-run"
|
|
28
|
+
"publish": "bun publish --access public || true"
|
|
31
29
|
},
|
|
32
30
|
"dependencies": {
|
|
33
31
|
"ua-parser-js": "^2.0.6"
|
|
@@ -36,5 +34,14 @@
|
|
|
36
34
|
"@ooneex/http-mimes": "0.0.1",
|
|
37
35
|
"@ooneex/types": "0.0.1"
|
|
38
36
|
},
|
|
39
|
-
"
|
|
37
|
+
"keywords": [
|
|
38
|
+
"browser",
|
|
39
|
+
"bun",
|
|
40
|
+
"headers",
|
|
41
|
+
"http",
|
|
42
|
+
"http-header",
|
|
43
|
+
"ooneex",
|
|
44
|
+
"typescript",
|
|
45
|
+
"user-agent"
|
|
46
|
+
]
|
|
40
47
|
}
|
|
Binary file
|