snapshot of https://github.com/mountain-loop/yaak.git (main, 2026-09-23; blobs > 131072B omitted)
This commit is contained in:
15
apps/yaak-client/lib/data/acceptLanguages.ts
Normal file
15
apps/yaak-client/lib/data/acceptLanguages.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
// Common Accept-Language values.
|
||||
export const acceptLanguages = [
|
||||
"*",
|
||||
"en",
|
||||
"en-US",
|
||||
"en-US,en;q=0.9",
|
||||
"en-GB,en;q=0.9",
|
||||
"de-DE,de;q=0.9,en;q=0.8",
|
||||
"fr-FR,fr;q=0.9,en;q=0.8",
|
||||
"es-ES,es;q=0.9,en;q=0.8",
|
||||
"ru-RU,ru;q=0.9,en;q=0.8",
|
||||
"uk-UA,uk;q=0.9,en;q=0.8",
|
||||
"zh-CN,zh;q=0.9,en;q=0.8",
|
||||
"ja-JP,ja;q=0.9,en;q=0.8",
|
||||
];
|
||||
16
apps/yaak-client/lib/data/cacheControl.ts
Normal file
16
apps/yaak-client/lib/data/cacheControl.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
// Common Cache-Control directives (request and response).
|
||||
export const cacheControlDirectives = [
|
||||
"no-cache",
|
||||
"no-store",
|
||||
"no-transform",
|
||||
"max-age=0",
|
||||
"max-age=3600",
|
||||
"max-age=86400",
|
||||
"s-maxage=3600",
|
||||
"must-revalidate",
|
||||
"proxy-revalidate",
|
||||
"stale-while-revalidate=60",
|
||||
"public",
|
||||
"private",
|
||||
"immutable",
|
||||
];
|
||||
121
apps/yaak-client/lib/data/charsets.ts
Normal file
121
apps/yaak-client/lib/data/charsets.ts
Normal file
@@ -0,0 +1,121 @@
|
||||
export const charsets = [
|
||||
"utf-8",
|
||||
"us-ascii",
|
||||
"950",
|
||||
"ASMO-708",
|
||||
"CP1026",
|
||||
"CP870",
|
||||
"DOS-720",
|
||||
"DOS-862",
|
||||
"EUC-CN",
|
||||
"IBM437",
|
||||
"Johab",
|
||||
"Windows-1252",
|
||||
"X-EBCDIC-Spain",
|
||||
"big5",
|
||||
"cp866",
|
||||
"csISO2022JP",
|
||||
"ebcdic-cp-us",
|
||||
"euc-kr",
|
||||
"gb2312",
|
||||
"hz-gb-2312",
|
||||
"ibm737",
|
||||
"ibm775",
|
||||
"ibm850",
|
||||
"ibm852",
|
||||
"ibm857",
|
||||
"ibm861",
|
||||
"ibm869",
|
||||
"iso-2022-jp",
|
||||
"iso-2022-jp",
|
||||
"iso-2022-kr",
|
||||
"iso-8859-1",
|
||||
"iso-8859-15",
|
||||
"iso-8859-2",
|
||||
"iso-8859-3",
|
||||
"iso-8859-4",
|
||||
"iso-8859-5",
|
||||
"iso-8859-6",
|
||||
"iso-8859-7",
|
||||
"iso-8859-8",
|
||||
"iso-8859-8-i",
|
||||
"iso-8859-9",
|
||||
"koi8-r",
|
||||
"koi8-u",
|
||||
"ks_c_5601-1987",
|
||||
"macintosh",
|
||||
"shift_jis",
|
||||
"unicode",
|
||||
"unicodeFFFE",
|
||||
"utf-7",
|
||||
"windows-1250",
|
||||
"windows-1251",
|
||||
"windows-1253",
|
||||
"windows-1254",
|
||||
"windows-1255",
|
||||
"windows-1256",
|
||||
"windows-1257",
|
||||
"windows-1258",
|
||||
"windows-874",
|
||||
"x-Chinese-CNS",
|
||||
"x-Chinese-Eten",
|
||||
"x-EBCDIC-Arabic",
|
||||
"x-EBCDIC-CyrillicRussian",
|
||||
"x-EBCDIC-CyrillicSerbianBulgarian",
|
||||
"x-EBCDIC-DenmarkNorway",
|
||||
"x-EBCDIC-FinlandSweden",
|
||||
"x-EBCDIC-Germany",
|
||||
"x-EBCDIC-Greek",
|
||||
"x-EBCDIC-GreekModern",
|
||||
"x-EBCDIC-Hebrew",
|
||||
"x-EBCDIC-Icelandic",
|
||||
"x-EBCDIC-Italy",
|
||||
"x-EBCDIC-JapaneseAndJapaneseLatin",
|
||||
"x-EBCDIC-JapaneseAndKana",
|
||||
"x-EBCDIC-JapaneseAndUSCanada",
|
||||
"x-EBCDIC-JapaneseKatakana",
|
||||
"x-EBCDIC-KoreanAndKoreanExtended",
|
||||
"x-EBCDIC-KoreanExtended",
|
||||
"x-EBCDIC-SimplifiedChinese",
|
||||
"x-EBCDIC-Thai",
|
||||
"x-EBCDIC-TraditionalChinese",
|
||||
"x-EBCDIC-Turkish",
|
||||
"x-EBCDIC-UK",
|
||||
"x-Europa",
|
||||
"x-IA5",
|
||||
"x-IA5-German",
|
||||
"x-IA5-Norwegian",
|
||||
"x-IA5-Swedish",
|
||||
"x-ebcdic-cp-us-euro",
|
||||
"x-ebcdic-denmarknorway-euro",
|
||||
"x-ebcdic-finlandsweden-euro",
|
||||
"x-ebcdic-finlandsweden-euro",
|
||||
"x-ebcdic-france-euro",
|
||||
"x-ebcdic-germany-euro",
|
||||
"x-ebcdic-icelandic-euro",
|
||||
"x-ebcdic-international-euro",
|
||||
"x-ebcdic-italy-euro",
|
||||
"x-ebcdic-spain-euro",
|
||||
"x-ebcdic-uk-euro",
|
||||
"x-euc-jp",
|
||||
"x-iscii-as",
|
||||
"x-iscii-be",
|
||||
"x-iscii-de",
|
||||
"x-iscii-gu",
|
||||
"x-iscii-ka",
|
||||
"x-iscii-ma",
|
||||
"x-iscii-or",
|
||||
"x-iscii-pa",
|
||||
"x-iscii-ta",
|
||||
"x-iscii-te",
|
||||
"x-mac-arabic",
|
||||
"x-mac-ce",
|
||||
"x-mac-chinesesimp",
|
||||
"x-mac-cyrillic",
|
||||
"x-mac-greek",
|
||||
"x-mac-hebrew",
|
||||
"x-mac-icelandic",
|
||||
"x-mac-japanese",
|
||||
"x-mac-korean",
|
||||
"x-mac-turkish",
|
||||
];
|
||||
1
apps/yaak-client/lib/data/connections.ts
Normal file
1
apps/yaak-client/lib/data/connections.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const connections = ["close", "keep-alive"];
|
||||
1
apps/yaak-client/lib/data/encodings.ts
Normal file
1
apps/yaak-client/lib/data/encodings.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const encodings = ["*", "gzip", "compress", "deflate", "br", "zstd", "identity"];
|
||||
70
apps/yaak-client/lib/data/headerNames.ts
Normal file
70
apps/yaak-client/lib/data/headerNames.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
import type { GenericCompletionOption } from "@yaakapp-internal/plugins";
|
||||
|
||||
export const headerNames: (GenericCompletionOption | string)[] = [
|
||||
{
|
||||
type: "constant",
|
||||
label: "Content-Type",
|
||||
info: "The original media type of the resource (prior to any content encoding applied for sending)",
|
||||
},
|
||||
{
|
||||
type: "constant",
|
||||
label: "Content-Length",
|
||||
info: "The size of the message body, in bytes, sent to the recipient",
|
||||
},
|
||||
{
|
||||
type: "constant",
|
||||
label: "Accept",
|
||||
info:
|
||||
"The content types, expressed as MIME types, the client is able to understand. " +
|
||||
"The server uses content negotiation to select one of the proposals and informs " +
|
||||
"the client of the choice with the Content-Type response header. Browsers set required " +
|
||||
"values for this header based on the context of the request. For example, a browser uses " +
|
||||
"different values in a request when fetching a CSS stylesheet, image, video, or a script.",
|
||||
},
|
||||
{
|
||||
type: "constant",
|
||||
label: "Accept-Encoding",
|
||||
info:
|
||||
"The content encoding (usually a compression algorithm) that the client can understand. " +
|
||||
"The server uses content negotiation to select one of the proposals and informs the client " +
|
||||
"of that choice with the Content-Encoding response header.",
|
||||
},
|
||||
{
|
||||
type: "constant",
|
||||
label: "Accept-Language",
|
||||
info:
|
||||
"The natural language and locale that the client prefers. The server uses content " +
|
||||
"negotiation to select one of the proposals and informs the client of the choice with " +
|
||||
"the Content-Language response header.",
|
||||
},
|
||||
{
|
||||
type: "constant",
|
||||
label: "Authorization",
|
||||
info: "Provide credentials that authenticate a user agent with a server, allowing access to a protected resource.",
|
||||
},
|
||||
"Cache-Control",
|
||||
"Cookie",
|
||||
"Connection",
|
||||
"Content-MD5",
|
||||
"Date",
|
||||
"Expect",
|
||||
"Forwarded",
|
||||
"From",
|
||||
"Host",
|
||||
"If-Match",
|
||||
"If-Modified-Since",
|
||||
"If-None-Match",
|
||||
"If-Range",
|
||||
"If-Unmodified-Since",
|
||||
"Max-Forwards",
|
||||
"Origin",
|
||||
"Pragma",
|
||||
"Proxy-Authorization",
|
||||
"Range",
|
||||
"Referer",
|
||||
"TE",
|
||||
"User-Agent",
|
||||
"Upgrade",
|
||||
"Via",
|
||||
"Warning",
|
||||
];
|
||||
7
apps/yaak-client/lib/data/headerValuePresets.ts
Normal file
7
apps/yaak-client/lib/data/headerValuePresets.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* A suggested value for a header. A plain string is used when the displayed
|
||||
* label and the inserted value are the same (e.g. mime types). The object form
|
||||
* lets us show a short, readable `label` (e.g. "Chrome (Windows)") while
|
||||
* inserting a longer `value` (the full User-Agent string).
|
||||
*/
|
||||
export type HeaderValuePreset = string | { label: string; value: string };
|
||||
213
apps/yaak-client/lib/data/mimetypes.ts
Normal file
213
apps/yaak-client/lib/data/mimetypes.ts
Normal file
@@ -0,0 +1,213 @@
|
||||
export const mimeTypes = [
|
||||
"application/json",
|
||||
"application/xml",
|
||||
"application/x-www-form-urlencoded",
|
||||
"multipart/form-data",
|
||||
"multipart/byteranges",
|
||||
"application/octet-stream",
|
||||
"text/plain",
|
||||
"application/javascript",
|
||||
"application/pdf",
|
||||
"text/html",
|
||||
"image/png",
|
||||
"image/jpeg",
|
||||
"image/gif",
|
||||
"image/webp",
|
||||
"text/css",
|
||||
"application/x-pkcs12",
|
||||
"application/xhtml+xml",
|
||||
"application/andrew-inset",
|
||||
"application/applixware",
|
||||
"application/atom+xml",
|
||||
"application/atomcat+xml",
|
||||
"application/atomsvc+xml",
|
||||
"application/bdoc",
|
||||
"application/cu-seeme",
|
||||
"application/davmount+xml",
|
||||
"application/docbook+xml",
|
||||
"application/dssc+xml",
|
||||
"application/ecmascript",
|
||||
"application/epub+zip",
|
||||
"application/exi",
|
||||
"application/font-tdpfr",
|
||||
"application/font-woff",
|
||||
"application/font-woff2",
|
||||
"application/geo+json",
|
||||
"application/graphql",
|
||||
"application/java-serialized-object",
|
||||
"application/json5",
|
||||
"application/jsonml+json",
|
||||
"application/ld+json",
|
||||
"application/lost+xml",
|
||||
"application/manifest+json",
|
||||
"application/mp4",
|
||||
"application/msword",
|
||||
"application/mxf",
|
||||
"application/n-triples",
|
||||
"application/n-quads",
|
||||
"application/oda",
|
||||
"application/ogg",
|
||||
"application/pgp-encrypted",
|
||||
"application/pgp-signature",
|
||||
"application/pics-rules",
|
||||
"application/pkcs10",
|
||||
"application/pkcs7-mime",
|
||||
"application/pkcs7-signature",
|
||||
"application/pkcs8",
|
||||
"application/postscript",
|
||||
"application/pskc+xml",
|
||||
"application/rdf+xml",
|
||||
"application/resource-lists+xml",
|
||||
"application/resource-lists-diff+xml",
|
||||
"application/rls-services+xml",
|
||||
"application/rsd+xml",
|
||||
"application/rss+xml",
|
||||
"application/rtf",
|
||||
"application/sdp",
|
||||
"application/shf+xml",
|
||||
"application/timestamped-data",
|
||||
"application/trig",
|
||||
"application/vnd.android.package-archive",
|
||||
"application/vnd.api+json",
|
||||
"application/vnd.apple.installer+xml",
|
||||
"application/vnd.apple.mpegurl",
|
||||
"application/vnd.apple.pkpass",
|
||||
"application/vnd.bmi",
|
||||
"application/vnd.curl.car",
|
||||
"application/vnd.curl.pcurl",
|
||||
"application/vnd.dna",
|
||||
"application/vnd.google-apps.document",
|
||||
"application/vnd.google-apps.presentation",
|
||||
"application/vnd.google-apps.spreadsheet",
|
||||
"application/vnd.hal+xml",
|
||||
"application/vnd.handheld-entertainment+xml",
|
||||
"application/vnd.macports.portpkg",
|
||||
"application/vnd.unity",
|
||||
"application/vnd.zul",
|
||||
"application/widget",
|
||||
"application/wsdl+xml",
|
||||
"application/x-7z-compressed",
|
||||
"application/x-ace-compressed",
|
||||
"application/x-bittorrent",
|
||||
"application/x-bzip",
|
||||
"application/x-bzip2",
|
||||
"application/x-cfs-compressed",
|
||||
"application/x-chrome-extension",
|
||||
"application/x-cocoa",
|
||||
"application/x-envoy",
|
||||
"application/x-eva",
|
||||
"font/opentype",
|
||||
"application/x-gca-compressed",
|
||||
"application/x-gtar",
|
||||
"application/x-hdf",
|
||||
"application/x-httpd-php",
|
||||
"application/x-install-instructions",
|
||||
"application/x-latex",
|
||||
"application/x-lua-bytecode",
|
||||
"application/x-lzh-compressed",
|
||||
"application/x-ms-application",
|
||||
"application/x-ms-shortcut",
|
||||
"application/x-ndjson",
|
||||
"application/x-perl",
|
||||
"application/x-pkcs7-certificates",
|
||||
"application/x-pkcs7-certreqresp",
|
||||
"application/x-rar-compressed",
|
||||
"application/x-sh",
|
||||
"application/x-sql",
|
||||
"application/x-subrip",
|
||||
"application/x-t3vm-image",
|
||||
"application/x-tads",
|
||||
"application/x-tar",
|
||||
"application/x-tcl",
|
||||
"application/x-tex",
|
||||
"application/x-x509-ca-cert",
|
||||
"application/xop+xml",
|
||||
"application/xslt+xml",
|
||||
"application/zip",
|
||||
"audio/3gpp",
|
||||
"audio/adpcm",
|
||||
"audio/basic",
|
||||
"audio/midi",
|
||||
"audio/mpeg",
|
||||
"audio/mp4",
|
||||
"audio/ogg",
|
||||
"audio/silk",
|
||||
"audio/wave",
|
||||
"audio/webm",
|
||||
"audio/x-aac",
|
||||
"audio/x-aiff",
|
||||
"audio/x-caf",
|
||||
"audio/x-flac",
|
||||
"audio/xm",
|
||||
"image/bmp",
|
||||
"image/cgm",
|
||||
"image/sgi",
|
||||
"image/svg+xml",
|
||||
"image/tiff",
|
||||
"image/x-3ds",
|
||||
"image/x-freehand",
|
||||
"image/x-icon",
|
||||
"image/x-jng",
|
||||
"image/x-mrsid-image",
|
||||
"image/x-pcx",
|
||||
"image/x-pict",
|
||||
"image/x-rgb",
|
||||
"image/x-tga",
|
||||
"message/rfc822",
|
||||
"text/cache-manifest",
|
||||
"text/calendar",
|
||||
"text/coffeescript",
|
||||
"text/csv",
|
||||
"text/hjson",
|
||||
"text/jade",
|
||||
"text/jsx",
|
||||
"text/less",
|
||||
"text/mathml",
|
||||
"text/n3",
|
||||
"text/richtext",
|
||||
"text/sgml",
|
||||
"text/slim",
|
||||
"text/stylus",
|
||||
"text/tab-separated-values",
|
||||
"text/turtle",
|
||||
"text/uri-list",
|
||||
"text/vcard",
|
||||
"text/vnd.curl",
|
||||
"text/vnd.fly",
|
||||
"text/vtt",
|
||||
"text/x-asm",
|
||||
"text/x-c",
|
||||
"text/x-component",
|
||||
"text/x-fortran",
|
||||
"text/x-handlebars-template",
|
||||
"text/x-java-source",
|
||||
"text/x-lua",
|
||||
"text/x-markdown",
|
||||
"text/x-nfo",
|
||||
"text/x-opml",
|
||||
"text/x-pascal",
|
||||
"text/x-processing",
|
||||
"text/x-sass",
|
||||
"text/x-scss",
|
||||
"text/x-vcalendar",
|
||||
"text/xml",
|
||||
"text/yaml",
|
||||
"video/3gpp",
|
||||
"video/3gpp2",
|
||||
"video/h261",
|
||||
"video/h263",
|
||||
"video/h264",
|
||||
"video/jpeg",
|
||||
"video/jpm",
|
||||
"video/mj2",
|
||||
"video/mp2t",
|
||||
"video/mp4",
|
||||
"video/mpeg",
|
||||
"video/ogg",
|
||||
"video/quicktime",
|
||||
"video/webm",
|
||||
"video/x-f4v",
|
||||
"video/x-fli",
|
||||
"video/x-flv",
|
||||
"video/x-m4v",
|
||||
];
|
||||
51
apps/yaak-client/lib/data/userAgents.ts
Normal file
51
apps/yaak-client/lib/data/userAgents.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import type { HeaderValuePreset } from "./headerValuePresets";
|
||||
|
||||
// Common, real-world User-Agent strings. The short `label` is shown in the
|
||||
// dropdown/autocomplete, while the full UA string is what gets inserted.
|
||||
//
|
||||
// Browsers freeze parts of their UA: Chrome reports its minor version as 0.0.0
|
||||
// and Safari reports macOS as 10_15_7, regardless of the actual version.
|
||||
export const userAgents: HeaderValuePreset[] = [
|
||||
{
|
||||
label: "Chrome 151 · Windows 10/11 · x64",
|
||||
value:
|
||||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36",
|
||||
},
|
||||
{
|
||||
label: "Edge 151 · Windows 10/11 · x64",
|
||||
value:
|
||||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36 Edg/151.0.0.0",
|
||||
},
|
||||
{
|
||||
label: "Firefox 153 · Windows 10/11 · x64",
|
||||
value: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:153.0) Gecko/20100101 Firefox/153.0",
|
||||
},
|
||||
{
|
||||
label: "Chrome 151 · macOS",
|
||||
value:
|
||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36",
|
||||
},
|
||||
{
|
||||
label: "Safari 27 · macOS",
|
||||
value:
|
||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/27.0 Safari/605.1.15",
|
||||
},
|
||||
{
|
||||
label: "Chrome 151 · Linux · x64",
|
||||
value:
|
||||
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36",
|
||||
},
|
||||
{
|
||||
label: "Safari 27 · iOS 27 · iPhone",
|
||||
value:
|
||||
"Mozilla/5.0 (iPhone; CPU iPhone OS 27_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/27.0 Mobile/15E148 Safari/604.1",
|
||||
},
|
||||
{
|
||||
label: "Chrome 151 · Android 16 · Pixel 10",
|
||||
value:
|
||||
"Mozilla/5.0 (Linux; Android 16; Pixel 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Mobile Safari/537.36",
|
||||
},
|
||||
{ label: "curl 8.21.0 · CLI", value: "curl/8.21.0" },
|
||||
{ label: "Postman 7.56 · API client", value: "PostmanRuntime/7.56.1" },
|
||||
{ label: "Insomnia 13.1 · API client", value: "insomnia/13.1.0" },
|
||||
];
|
||||
Reference in New Issue
Block a user