create project
This commit is contained in:
7
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/cached.d.ts
generated
vendored
Normal file
7
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/cached.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* A simple caching behavior.
|
||||
* We cache the result based on the key `K`
|
||||
* which uses referential equality, to avoid re-computing
|
||||
* the result for the same key.
|
||||
*/
|
||||
export declare function cached<K, V>(generate: (key: K) => V): (key: K) => V;
|
||||
19
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/cached.js
generated
vendored
Normal file
19
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/cached.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.cached = cached;
|
||||
function cached(generate) {
|
||||
let cache = undefined;
|
||||
return (key)=>{
|
||||
if ((cache == null ? void 0 : cache.key) !== key) {
|
||||
cache = {
|
||||
key,
|
||||
value: generate(key)
|
||||
};
|
||||
}
|
||||
return cache.value;
|
||||
};
|
||||
}
|
||||
|
||||
//# sourceMappingURL=cached.js.map
|
||||
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/cached.js.map
generated
vendored
Normal file
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/cached.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../server/web/spec-extension/cookies/cached.ts"],"names":["cached","generate","cache","undefined","key","value"],"mappings":"AAMA;;;;QAAgBA,MAAM,GAANA,MAAM;AAAf,SAASA,MAAM,CAAOC,QAAuB,EAAE;IACpD,IAAIC,KAAK,GAAqCC,SAAS;IACvD,OAAO,CAACC,GAAM,GAAK;QACjB,IAAIF,CAAAA,KAAK,QAAK,GAAVA,KAAAA,CAAU,GAAVA,KAAK,CAAEE,GAAG,CAAA,KAAKA,GAAG,EAAE;YACtBF,KAAK,GAAG;gBAAEE,GAAG;gBAAEC,KAAK,EAAEJ,QAAQ,CAACG,GAAG,CAAC;aAAE;SACtC;QAED,OAAOF,KAAK,CAACG,KAAK,CAAA;KACnB,CAAA;CACF"}
|
||||
3
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/index.d.ts
generated
vendored
Normal file
3
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export type { CookieListItem, RequestCookie, ResponseCookie } from './types';
|
||||
export { RequestCookies } from './request-cookies';
|
||||
export { ResponseCookies } from './response-cookies';
|
||||
20
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/index.js
generated
vendored
Normal file
20
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/index.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "RequestCookies", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return _requestCookies.RequestCookies;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "ResponseCookies", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return _responseCookies.ResponseCookies;
|
||||
}
|
||||
});
|
||||
var _requestCookies = require("./request-cookies");
|
||||
var _responseCookies = require("./response-cookies");
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/index.js.map
generated
vendored
Normal file
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../server/web/spec-extension/cookies/index.ts"],"names":["RequestCookies","ResponseCookies"],"mappings":"AACA;;;;+BACSA,gBAAc;;;+BAAdA,cAAc;;;+BACdC,iBAAe;;;gCAAfA,eAAe;;;8BADO,mBAAmB;+BAClB,oBAAoB"}
|
||||
28
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/request-cookies.d.ts
generated
vendored
Normal file
28
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/request-cookies.d.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import type { RequestCookie } from './types';
|
||||
/**
|
||||
* A class for manipulating {@link Request} cookies (`Cookie` header).
|
||||
*/
|
||||
export declare class RequestCookies {
|
||||
readonly _headers: Headers;
|
||||
_parsed: Map<string, RequestCookie>;
|
||||
constructor(requestHeaders: Headers);
|
||||
[Symbol.iterator](): IterableIterator<[string, RequestCookie]>;
|
||||
/**
|
||||
* The amount of cookies received from the client
|
||||
*/
|
||||
get size(): number;
|
||||
get(...args: [name: string] | [RequestCookie]): RequestCookie | undefined;
|
||||
getAll(...args: [name: string] | [RequestCookie] | []): RequestCookie[];
|
||||
has(name: string): boolean;
|
||||
set(...args: [key: string, value: string] | [options: RequestCookie]): this;
|
||||
/**
|
||||
* Delete the cookies matching the passed name or names in the request.
|
||||
*/
|
||||
delete(
|
||||
/** Name or names of the cookies to be deleted */
|
||||
names: string | string[]): boolean | boolean[];
|
||||
/**
|
||||
* Delete all the cookies in the cookies in the request.
|
||||
*/
|
||||
clear(): this;
|
||||
}
|
||||
80
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/request-cookies.js
generated
vendored
Normal file
80
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/request-cookies.js
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _serialize = require("./serialize");
|
||||
class RequestCookies {
|
||||
_parsed = new Map();
|
||||
constructor(requestHeaders){
|
||||
this._headers = requestHeaders;
|
||||
const header = requestHeaders.get("cookie");
|
||||
if (header) {
|
||||
const parsed = (0, _serialize).parseCookieString(header);
|
||||
for (const [name, value] of parsed){
|
||||
this._parsed.set(name, {
|
||||
name,
|
||||
value
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
[Symbol.iterator]() {
|
||||
return this._parsed[Symbol.iterator]();
|
||||
}
|
||||
/**
|
||||
* The amount of cookies received from the client
|
||||
*/ get size() {
|
||||
return this._parsed.size;
|
||||
}
|
||||
get(...args) {
|
||||
const name = typeof args[0] === "string" ? args[0] : args[0].name;
|
||||
return this._parsed.get(name);
|
||||
}
|
||||
getAll(...args) {
|
||||
var ref;
|
||||
const all = Array.from(this._parsed);
|
||||
if (!args.length) {
|
||||
return all.map(([_, value])=>value);
|
||||
}
|
||||
const name = typeof args[0] === "string" ? args[0] : (ref = args[0]) == null ? void 0 : ref.name;
|
||||
return all.filter(([n])=>n === name).map(([_, value])=>value);
|
||||
}
|
||||
has(name) {
|
||||
return this._parsed.has(name);
|
||||
}
|
||||
set(...args) {
|
||||
const [name, value] = args.length === 1 ? [
|
||||
args[0].name,
|
||||
args[0].value
|
||||
] : args;
|
||||
const map = this._parsed;
|
||||
map.set(name, {
|
||||
name,
|
||||
value
|
||||
});
|
||||
this._headers.set("cookie", Array.from(map).map(([_, v])=>(0, _serialize).serialize(v)).join("; "));
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Delete the cookies matching the passed name or names in the request.
|
||||
*/ delete(/** Name or names of the cookies to be deleted */ names) {
|
||||
const map = this._parsed;
|
||||
const result = !Array.isArray(names) ? map.delete(names) : names.map((name)=>map.delete(name));
|
||||
this._headers.set("cookie", Array.from(map).map(([_, value])=>(0, _serialize).serialize(value)).join("; "));
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Delete all the cookies in the cookies in the request.
|
||||
*/ clear() {
|
||||
this.delete(Array.from(this._parsed.keys()));
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Format the cookies in the request as a string for logging
|
||||
*/ [Symbol.for("edge-runtime.inspect.custom")]() {
|
||||
return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;
|
||||
}
|
||||
}
|
||||
exports.RequestCookies = RequestCookies;
|
||||
|
||||
//# sourceMappingURL=request-cookies.js.map
|
||||
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/request-cookies.js.map
generated
vendored
Normal file
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/request-cookies.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../server/web/spec-extension/cookies/request-cookies.ts"],"names":["RequestCookies","_parsed","Map","constructor","requestHeaders","_headers","header","get","parsed","parseCookieString","name","value","set","Symbol","iterator","size","args","getAll","all","Array","from","length","map","_","filter","n","has","v","serialize","join","delete","names","result","isArray","clear","keys","for","JSON","stringify","Object","fromEntries"],"mappings":"AAAA;;;;AAC6C,IAAA,UAAa,WAAb,aAAa,CAAA;AAKnD,MAAMA,cAAc;IAEzBC,OAAO,GAA+B,IAAIC,GAAG,EAAE,CAAA;IAE/CC,YAAYC,cAAuB,CAAE;QACnC,IAAI,CAACC,QAAQ,GAAGD,cAAc;QAC9B,MAAME,MAAM,GAAGF,cAAc,CAACG,GAAG,CAAC,QAAQ,CAAC;QAC3C,IAAID,MAAM,EAAE;YACV,MAAME,MAAM,GAAGC,CAAAA,GAAAA,UAAiB,AAAQ,CAAA,kBAAR,CAACH,MAAM,CAAC;YACxC,KAAK,MAAM,CAACI,IAAI,EAAEC,KAAK,CAAC,IAAIH,MAAM,CAAE;gBAClC,IAAI,CAACP,OAAO,CAACW,GAAG,CAACF,IAAI,EAAE;oBAAEA,IAAI;oBAAEC,KAAK;iBAAE,CAAC;aACxC;SACF;KACF;IAED,CAACE,MAAM,CAACC,QAAQ,CAAC,GAAG;QAClB,OAAO,IAAI,CAACb,OAAO,CAACY,MAAM,CAACC,QAAQ,CAAC,EAAE,CAAA;KACvC;IAED;;KAEG,CACH,IAAIC,IAAI,GAAW;QACjB,OAAO,IAAI,CAACd,OAAO,CAACc,IAAI,CAAA;KACzB;IAEDR,GAAG,CAAC,GAAGS,IAAI,AAAkC,EAAE;QAC7C,MAAMN,IAAI,GAAG,OAAOM,I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OAAO,CAAC,eAAe,EAAEC,IAAI,CAACC,SAAS,CAACC,MAAM,CAACC,WAAW,CAAC,IAAI,CAACvC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;KAC5E;CACF;QA/FYD,cAAc,GAAdA,cAAc"}
|
||||
27
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/response-cookies.d.ts
generated
vendored
Normal file
27
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/response-cookies.d.ts
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { ResponseCookie } from './types';
|
||||
/**
|
||||
* A class for manipulating {@link Response} cookies (`Set-Cookie` header).
|
||||
* Loose implementation of the experimental [Cookie Store API](https://wicg.github.io/cookie-store/#dictdef-cookie)
|
||||
* The main difference is `ResponseCookies` methods do not return a Promise.
|
||||
*/
|
||||
export declare class ResponseCookies {
|
||||
readonly _headers: Headers;
|
||||
_parsed: Map<string, ResponseCookie>;
|
||||
constructor(responseHeaders: Headers);
|
||||
/**
|
||||
* {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise.
|
||||
*/
|
||||
get(...args: [key: string] | [options: ResponseCookie]): ResponseCookie | undefined;
|
||||
/**
|
||||
* {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise.
|
||||
*/
|
||||
getAll(...args: [key: string] | [options: ResponseCookie] | []): ResponseCookie[];
|
||||
/**
|
||||
* {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise.
|
||||
*/
|
||||
set(...args: [key: string, value: string, cookie?: Partial<ResponseCookie>] | [options: ResponseCookie]): this;
|
||||
/**
|
||||
* {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise.
|
||||
*/
|
||||
delete(...args: [key: string] | [options: ResponseCookie]): this;
|
||||
}
|
||||
88
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/response-cookies.js
generated
vendored
Normal file
88
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/response-cookies.js
generated
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _serialize = require("./serialize");
|
||||
function replace(bag, headers) {
|
||||
headers.delete("set-cookie");
|
||||
for (const [, value] of bag){
|
||||
const serialized = (0, _serialize).serialize(value);
|
||||
headers.append("set-cookie", serialized);
|
||||
}
|
||||
}
|
||||
function normalizeCookie(cookie = {
|
||||
name: "",
|
||||
value: ""
|
||||
}) {
|
||||
if (cookie.maxAge) {
|
||||
cookie.expires = new Date(Date.now() + cookie.maxAge * 1000);
|
||||
}
|
||||
if (cookie.path === null || cookie.path === undefined) {
|
||||
cookie.path = "/";
|
||||
}
|
||||
return cookie;
|
||||
}
|
||||
class ResponseCookies {
|
||||
_parsed = new Map();
|
||||
constructor(responseHeaders){
|
||||
this._headers = responseHeaders;
|
||||
// @ts-expect-error See https://github.com/whatwg/fetch/issues/973
|
||||
const headers = this._headers.getAll("set-cookie");
|
||||
for (const header of headers){
|
||||
const parsed = (0, _serialize).parseSetCookieString(header);
|
||||
if (parsed) {
|
||||
this._parsed.set(parsed.name, parsed);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise.
|
||||
*/ get(...args) {
|
||||
const key = typeof args[0] === "string" ? args[0] : args[0].name;
|
||||
return this._parsed.get(key);
|
||||
}
|
||||
/**
|
||||
* {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise.
|
||||
*/ getAll(...args) {
|
||||
var ref;
|
||||
const all = Array.from(this._parsed.values());
|
||||
if (!args.length) {
|
||||
return all;
|
||||
}
|
||||
const key = typeof args[0] === "string" ? args[0] : (ref = args[0]) == null ? void 0 : ref.name;
|
||||
return all.filter((c)=>c.name === key);
|
||||
}
|
||||
/**
|
||||
* {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise.
|
||||
*/ set(...args) {
|
||||
const [name, value, cookie] = args.length === 1 ? [
|
||||
args[0].name,
|
||||
args[0].value,
|
||||
args[0]
|
||||
] : args;
|
||||
const map = this._parsed;
|
||||
map.set(name, normalizeCookie({
|
||||
name,
|
||||
value,
|
||||
...cookie
|
||||
}));
|
||||
replace(map, this._headers);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise.
|
||||
*/ delete(...args) {
|
||||
const name = typeof args[0] === "string" ? args[0] : args[0].name;
|
||||
return this.set({
|
||||
name,
|
||||
value: "",
|
||||
expires: new Date(0)
|
||||
});
|
||||
}
|
||||
[Symbol.for("edge-runtime.inspect.custom")]() {
|
||||
return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;
|
||||
}
|
||||
}
|
||||
exports.ResponseCookies = ResponseCookies;
|
||||
|
||||
//# sourceMappingURL=response-cookies.js.map
|
||||
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/response-cookies.js.map
generated
vendored
Normal file
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/response-cookies.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../server/web/spec-extension/cookies/response-cookies.ts"],"names":["replace","bag","headers","delete","value","serialized","serialize","append","normalizeCookie","cookie","name","maxAge","expires","Date","now","path","undefined","ResponseCookies","_parsed","Map","constructor","responseHeaders","_headers","getAll","header","parsed","parseSetCookieString","set","get","args","key","all","Array","from","values","length","filter","c","map","Symbol","for","JSON","stringify","Object","fromEntries"],"mappings":"AAAA;;;;AACgD,IAAA,UAAa,WAAb,aAAa,CAAA;AAE7D,SAASA,OAAO,CAACC,GAAgC,EAAEC,OAAgB,EAAE;IACnEA,OAAO,CAACC,MAAM,CAAC,YAAY,CAAC;IAC5B,KAAK,MAAM,GAAGC,KAAK,CAAC,IAAIH,GAAG,CAAE;QAC3B,MA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AAG0B,IAAI,AAA2C,EAAQ;QAC/D,MAAMnB,IAAI,GAAG,OAAOmB,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,GAAGA,IAAI,CAAC,CAAC,CAAC,GAAGA,IAAI,CAAC,CAAC,CAAC,CAACnB,IAAI;QACjE,OAAO,IAAI,CAACiB,GAAG,CAAC;YAAEjB,IAAI;YAAEN,KAAK,EAAE,EAAE;YAAEQ,OAAO,EAAE,IAAIC,IAAI,CAAC,CAAC,CAAC;SAAE,CAAC,CAAA;KAC3D;IAED,CAAC0B,MAAM,CAACC,GAAG,CAAC,6BAA6B,CAAC,CAAC,GAAG;QAC5C,OAAO,CAAC,gBAAgB,EAAEC,IAAI,CAACC,SAAS,CAACC,MAAM,CAACC,WAAW,CAAC,IAAI,CAAC1B,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;KAC7E;CACF;QArEYD,eAAe,GAAfA,eAAe"}
|
||||
10
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/serialize.d.ts
generated
vendored
Normal file
10
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/serialize.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { RequestCookie, ResponseCookie } from './types';
|
||||
export declare function serialize(c: ResponseCookie | RequestCookie): string;
|
||||
/**
|
||||
* Parse a `Cookie` or `Set-Cookie header value
|
||||
*/
|
||||
export declare function parseCookieString(cookie: string): Map<string, string>;
|
||||
/**
|
||||
* Parse a `Set-Cookie` header value
|
||||
*/
|
||||
export declare function parseSetCookieString(setCookie: string): undefined | ResponseCookie;
|
||||
80
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/serialize.js
generated
vendored
Normal file
80
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/serialize.js
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.serialize = serialize;
|
||||
exports.parseCookieString = parseCookieString;
|
||||
exports.parseSetCookieString = parseSetCookieString;
|
||||
const SAME_SITE = [
|
||||
"strict",
|
||||
"lax",
|
||||
"none"
|
||||
];
|
||||
function parseSameSite(string) {
|
||||
string = string.toLowerCase();
|
||||
return SAME_SITE.includes(string) ? string : undefined;
|
||||
}
|
||||
function compact(t) {
|
||||
const newT = {};
|
||||
for(const key in t){
|
||||
if (t[key]) {
|
||||
newT[key] = t[key];
|
||||
}
|
||||
}
|
||||
return newT;
|
||||
}
|
||||
function serialize(c) {
|
||||
const attrs = [
|
||||
"path" in c && c.path && `Path=${c.path}`,
|
||||
"expires" in c && c.expires && `Expires=${c.expires.toUTCString()}`,
|
||||
"maxAge" in c && c.maxAge && `Max-Age=${c.maxAge}`,
|
||||
"domain" in c && c.domain && `Domain=${c.domain}`,
|
||||
"secure" in c && c.secure && "Secure",
|
||||
"httpOnly" in c && c.httpOnly && "HttpOnly",
|
||||
"sameSite" in c && c.sameSite && `SameSite=${c.sameSite}`,
|
||||
].filter(Boolean);
|
||||
return `${c.name}=${encodeURIComponent(c.value ?? "")}; ${attrs.join("; ")}`;
|
||||
}
|
||||
function parseCookieString(cookie) {
|
||||
const map = new Map();
|
||||
for (const pair of cookie.split(/; */)){
|
||||
if (!pair) continue;
|
||||
const [key, value] = pair.split("=", 2);
|
||||
map.set(key, decodeURIComponent(value ?? "true"));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
function parseSetCookieString(setCookie) {
|
||||
if (!setCookie) {
|
||||
return undefined;
|
||||
}
|
||||
const [[name, value], ...attributes] = parseCookieString(setCookie);
|
||||
const { domain , expires , httponly , maxage , path , samesite , secure } = Object.fromEntries(attributes.map(([key, v])=>[
|
||||
key.toLowerCase(),
|
||||
v
|
||||
]));
|
||||
const cookie = {
|
||||
name,
|
||||
value: decodeURIComponent(value),
|
||||
domain,
|
||||
...expires && {
|
||||
expires: new Date(expires)
|
||||
},
|
||||
...httponly && {
|
||||
httpOnly: true
|
||||
},
|
||||
...typeof maxage === "string" && {
|
||||
maxAge: Number(maxage)
|
||||
},
|
||||
path,
|
||||
...samesite && {
|
||||
sameSite: parseSameSite(samesite)
|
||||
},
|
||||
...secure && {
|
||||
secure: true
|
||||
}
|
||||
};
|
||||
return compact(cookie);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=serialize.js.map
|
||||
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/serialize.js.map
generated
vendored
Normal file
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/serialize.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../server/web/spec-extension/cookies/serialize.ts"],"names":["serialize","parseCookieString","parseSetCookieString","SAME_SITE","parseSameSite","string","toLowerCase","includes","undefined","compact","t","newT","key","c","attrs","path","expires","toUTCString","maxAge","domain","secure","httpOnly","sameSite","filter","Boolean","name","encodeURIComponent","value","join","cookie","map","Map","pair","split","set","decodeURIComponent","setCookie","attributes","httponly","maxage","samesite","Object","fromEntries","v","Date","Number"],"mappings":"AAAA;;;;QAoBgBA,SAAS,GAATA,SAAS;QAiBTC,iBAAiB,GAAjBA,iBAAiB;QAejBC,oBAAoB,GAApBA,oBAAoB;AAlDpC,MAAMC,SAAS,GAAiC;IAAC,QAAQ;IAAE,KAAK;IAAE,MAAM;CAAC;AACzE,SAASC,aAAa,CAACC,MAAc,EAA8B;IACjEA,MAAM,GAAGA,MAAM,CAACC,WAAW,EAAE;IAC7B,OAAOH,SAAS,CAACI,QAAQ,CAACF,MAAM,CAAQ,GACnCA,MAAM,GACPG,SAAS,CAAA;CACd;AAED,SAASC,OAAO,CAAIC,CAAI,EAAK;IAC3B,MAAMC,IAAI,GAAG,EAAE,AAAc;IAC7B,IAAK,MAAMC,GAAG,IAAIF,CAAC,CAAE;QACnB,IAAIA,CAAC,CAACE,GAAG,CAAC,EAAE;YACVD,IAAI,CAACC,GAAG,CAAC,GAAGF,CAAC,CAACE,GAAG,CAAC;SACnB;KACF;IACD,OAAOD,IAAI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AED,OAAOX,OAAO,CAACoB,MAAM,CAAC,CAAA;CACvB"}
|
||||
101
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/types.d.ts
generated
vendored
Normal file
101
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
export interface CookieSerializeOptions {
|
||||
/**
|
||||
* Specifies the value for the Domain Set-Cookie attribute. By default, no
|
||||
* domain is set, and most clients will consider the cookie to apply to only
|
||||
* the current domain.
|
||||
*/
|
||||
domain?: string;
|
||||
/**
|
||||
* Specifies a function that will be used to encode a cookie's value. Since
|
||||
* value of a cookie has a limited character set (and must be a simple
|
||||
* string), this function can be used to encode a value into a string suited
|
||||
* for a cookie's value.
|
||||
*
|
||||
* The default function is the global `encodeURIComponent`, which will
|
||||
* encode a JavaScript string into UTF-8 byte sequences and then URL-encode
|
||||
* any that fall outside of the cookie range.
|
||||
*/
|
||||
encode?(val: string): string;
|
||||
/**
|
||||
* Specifies the `Date` object to be the value for the `Expires`
|
||||
* `Set-Cookie` attribute. By default, no expiration is set, and most
|
||||
* clients will consider this a "non-persistent cookie" and will delete it
|
||||
* on a condition like exiting a web browser application.
|
||||
*
|
||||
* *Note* the cookie storage model specification states that if both
|
||||
* `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is
|
||||
* possible not all clients by obey this, so if both are set, they should
|
||||
* point to the same date and time.
|
||||
*/
|
||||
expires?: Date;
|
||||
/**
|
||||
* Specifies the boolean value for the `HttpOnly` `Set-Cookie` attribute.
|
||||
* When truthy, the `HttpOnly` attribute is set, otherwise it is not. By
|
||||
* default, the `HttpOnly` attribute is not set.
|
||||
*
|
||||
* *Note* be careful when setting this to true, as compliant clients will
|
||||
* not allow client-side JavaScript to see the cookie in `document.cookie`.
|
||||
*/
|
||||
httpOnly?: boolean;
|
||||
/**
|
||||
* Specifies the number (in seconds) to be the value for the `Max-Age`
|
||||
* `Set-Cookie` attribute. The given number will be converted to an integer
|
||||
* by rounding down. By default, no maximum age is set.
|
||||
*
|
||||
* *Note* the cookie storage model specification states that if both
|
||||
* `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is
|
||||
* possible not all clients by obey this, so if both are set, they should
|
||||
* point to the same date and time.
|
||||
*/
|
||||
maxAge?: number;
|
||||
/**
|
||||
* Specifies the value for the `Path` `Set-Cookie` attribute. By default,
|
||||
* the path is considered the "default path".
|
||||
*/
|
||||
path?: string;
|
||||
/**
|
||||
* Specifies the boolean or string to be the value for the `SameSite`
|
||||
* `Set-Cookie` attribute.
|
||||
*
|
||||
* - `true` will set the `SameSite` attribute to `Strict` for strict same
|
||||
* site enforcement.
|
||||
* - `false` will not set the `SameSite` attribute.
|
||||
* - `'lax'` will set the `SameSite` attribute to Lax for lax same site
|
||||
* enforcement.
|
||||
* - `'strict'` will set the `SameSite` attribute to Strict for strict same
|
||||
* site enforcement.
|
||||
* - `'none'` will set the SameSite attribute to None for an explicit
|
||||
* cross-site cookie.
|
||||
*/
|
||||
sameSite?: boolean | 'lax' | 'strict' | 'none';
|
||||
/**
|
||||
* Specifies the boolean value for the `Secure` `Set-Cookie` attribute. When
|
||||
* truthy, the `Secure` attribute is set, otherwise it is not. By default,
|
||||
* the `Secure` attribute is not set.
|
||||
*
|
||||
* *Note* be careful when setting this to `true`, as compliant clients will
|
||||
* not send the cookie back to the server in the future if the browser does
|
||||
* not have an HTTPS connection.
|
||||
*/
|
||||
secure?: boolean;
|
||||
}
|
||||
/**
|
||||
* {@link https://wicg.github.io/cookie-store/#dictdef-cookielistitem CookieListItem}
|
||||
* as specified by W3C.
|
||||
*/
|
||||
export interface CookieListItem extends Partial<Pick<CookieSerializeOptions, 'domain' | 'path' | 'expires' | 'secure' | 'sameSite'>> {
|
||||
/** A string with the name of a cookie. */
|
||||
name: string;
|
||||
/** A string containing the value of the cookie. */
|
||||
value: string;
|
||||
}
|
||||
/**
|
||||
* Superset of {@link CookieListItem} extending it with
|
||||
* the `httpOnly`, `maxAge` and `priority` properties.
|
||||
*/
|
||||
export declare type ResponseCookie = CookieListItem & Partial<Pick<CookieSerializeOptions, 'httpOnly' | 'maxAge'>>;
|
||||
/**
|
||||
* Subset of {@link CookieListItem}, only containing `name` and `value`
|
||||
* since other cookie attributes aren't be available on a `Request`.
|
||||
*/
|
||||
export declare type RequestCookie = Pick<CookieListItem, 'name' | 'value'>;
|
||||
6
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/types.js
generated
vendored
Normal file
6
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/types.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
//# sourceMappingURL=types.js.map
|
||||
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/types.js.map
generated
vendored
Normal file
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/cookies/types.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../server/web/spec-extension/cookies/types.ts"],"names":[],"mappings":"AAAA"}
|
||||
33
kitabcitab/node_modules/next/dist/server/web/spec-extension/fetch-event.d.ts
generated
vendored
Normal file
33
kitabcitab/node_modules/next/dist/server/web/spec-extension/fetch-event.d.ts
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import { NextRequest } from './request';
|
||||
declare const responseSymbol: unique symbol;
|
||||
declare const passThroughSymbol: unique symbol;
|
||||
export declare const waitUntilSymbol: unique symbol;
|
||||
declare class FetchEvent {
|
||||
readonly [waitUntilSymbol]: Promise<any>[];
|
||||
[responseSymbol]?: Promise<Response>;
|
||||
[passThroughSymbol]: boolean;
|
||||
constructor(_request: Request);
|
||||
respondWith(response: Response | Promise<Response>): void;
|
||||
passThroughOnException(): void;
|
||||
waitUntil(promise: Promise<any>): void;
|
||||
}
|
||||
export declare class NextFetchEvent extends FetchEvent {
|
||||
sourcePage: string;
|
||||
constructor(params: {
|
||||
request: NextRequest;
|
||||
page: string;
|
||||
});
|
||||
/**
|
||||
* @deprecated The `request` is now the first parameter and the API is now async.
|
||||
*
|
||||
* Read more: https://nextjs.org/docs/messages/middleware-new-signature
|
||||
*/
|
||||
get request(): void;
|
||||
/**
|
||||
* @deprecated Using `respondWith` is no longer needed.
|
||||
*
|
||||
* Read more: https://nextjs.org/docs/messages/middleware-new-signature
|
||||
*/
|
||||
respondWith(): void;
|
||||
}
|
||||
export {};
|
||||
54
kitabcitab/node_modules/next/dist/server/web/spec-extension/fetch-event.js
generated
vendored
Normal file
54
kitabcitab/node_modules/next/dist/server/web/spec-extension/fetch-event.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.waitUntilSymbol = void 0;
|
||||
var _error = require("../error");
|
||||
const responseSymbol = Symbol("response");
|
||||
const passThroughSymbol = Symbol("passThrough");
|
||||
const waitUntilSymbol = Symbol("waitUntil");
|
||||
exports.waitUntilSymbol = waitUntilSymbol;
|
||||
class FetchEvent {
|
||||
[waitUntilSymbol] = [];
|
||||
[passThroughSymbol] = false;
|
||||
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
||||
constructor(_request){}
|
||||
respondWith(response) {
|
||||
if (!this[responseSymbol]) {
|
||||
this[responseSymbol] = Promise.resolve(response);
|
||||
}
|
||||
}
|
||||
passThroughOnException() {
|
||||
this[passThroughSymbol] = true;
|
||||
}
|
||||
waitUntil(promise) {
|
||||
this[waitUntilSymbol].push(promise);
|
||||
}
|
||||
}
|
||||
class NextFetchEvent extends FetchEvent {
|
||||
constructor(params){
|
||||
super(params.request);
|
||||
this.sourcePage = params.page;
|
||||
}
|
||||
/**
|
||||
* @deprecated The `request` is now the first parameter and the API is now async.
|
||||
*
|
||||
* Read more: https://nextjs.org/docs/messages/middleware-new-signature
|
||||
*/ get request() {
|
||||
throw new _error.PageSignatureError({
|
||||
page: this.sourcePage
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @deprecated Using `respondWith` is no longer needed.
|
||||
*
|
||||
* Read more: https://nextjs.org/docs/messages/middleware-new-signature
|
||||
*/ respondWith() {
|
||||
throw new _error.PageSignatureError({
|
||||
page: this.sourcePage
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.NextFetchEvent = NextFetchEvent;
|
||||
|
||||
//# sourceMappingURL=fetch-event.js.map
|
||||
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/fetch-event.js.map
generated
vendored
Normal file
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/fetch-event.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../server/web/spec-extension/fetch-event.ts"],"names":["responseSymbol","Symbol","passThroughSymbol","waitUntilSymbol","FetchEvent","constructor","_request","respondWith","response","Promise","resolve","passThroughOnException","waitUntil","promise","push","NextFetchEvent","params","request","sourcePage","page","PageSignatureError"],"mappings":"AAAA;;;;;AAAmC,IAAA,MAAU,WAAV,UAAU,CAAA;AAG7C,MAAMA,cAAc,GAAGC,MAAM,CAAC,UAAU,CAAC;AACzC,MAAMC,iBAAiB,GAAGD,MAAM,CAAC,aAAa,CAAC;AACxC,MAAME,eAAe,GAAGF,MAAM,CAAC,WAAW,CAAC;QAArCE,eAAe,GAAfA,eAAe;AAE5B,MAAMC,UAAU;IACL,CAACD,eAAe,CAAC,GAAmB,EAAE,CAAC;IAEhD,CAACD,iBAAiB,CAAC,GAAG,KAAK,CAAA;IAE3B,qEAAqE;IACrEG,YAAYC,QAAiB,CAAE,EAAE;IAEjCC,WAAW,CAACC,QAAsC,EAAQ;QACxD,IAAI,CAAC,IAAI,CAACR,cAAc,CAAC,EAAE;YACzB,IAAI,CAACA,cAAc,CAAC,GAAGS,OAAO,CAACC,OAAO,CAACF,QAAQ,CAAC;SACjD;KACF;IAEDG,sBAAsB,GAAS;QAC7B,IAAI,CAACT,iBAAiB,CAAC,GAAG,IAAI;KAC/B;IAEDU,SAAS,CAACC,OAAqB,EAAQ;QACrC,IAAI,CAACV,eAAe,CAAC,CAACW,IAAI,CAACD,OAAO,CAAC;KACpC;CACF;AAEM,MAAME,cAAc,SAASX,UAAU;IAG5CC,YAAYW,MAA8C,CAAE;QAC1D,KAAK,CAACA,MAAM,CAACC,OAAO,CAAC;QACrB,IAAI,CAACC,UAAU,GAAGF,MAAM,CAACG,IAAI;KAC9B;IAED;;;;KAIG,CACH,IAAIF,OAAO,GAAG;QACZ,MAAM,IAAIG,MAAkB,mBAAA,CAAC;YAC3BD,IAAI,EAAE,IAAI,CAACD,UAAU;SACtB,CAAC,CAAA;KACH;IAED;;;;KAIG,CACHX,WAAW,GAAG;QACZ,MAAM,IAAIa,MAAkB,mBAAA,CAAC;YAC3BD,IAAI,EAAE,IAAI,CAACD,UAAU;SACtB,CAAC,CAAA;KACH;CACF;QA7BYH,cAAc,GAAdA,cAAc"}
|
||||
50
kitabcitab/node_modules/next/dist/server/web/spec-extension/request.d.ts
generated
vendored
Normal file
50
kitabcitab/node_modules/next/dist/server/web/spec-extension/request.d.ts
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
import type { I18NConfig } from '../../config-shared';
|
||||
import type { RequestData } from '../types';
|
||||
import { NextURL } from '../next-url';
|
||||
import { RequestCookies } from './cookies';
|
||||
export declare const INTERNALS: unique symbol;
|
||||
export declare class NextRequest extends Request {
|
||||
[INTERNALS]: {
|
||||
cookies: RequestCookies;
|
||||
geo: RequestData['geo'];
|
||||
ip?: string;
|
||||
url: NextURL;
|
||||
};
|
||||
constructor(input: URL | RequestInfo, init?: RequestInit);
|
||||
get cookies(): RequestCookies;
|
||||
get geo(): {
|
||||
city?: string | undefined;
|
||||
country?: string | undefined;
|
||||
region?: string | undefined;
|
||||
latitude?: string | undefined;
|
||||
longitude?: string | undefined;
|
||||
} | undefined;
|
||||
get ip(): string | undefined;
|
||||
get nextUrl(): NextURL;
|
||||
/**
|
||||
* @deprecated
|
||||
* `page` has been deprecated in favour of `URLPattern`.
|
||||
* Read more: https://nextjs.org/docs/messages/middleware-request-page
|
||||
*/
|
||||
get page(): void;
|
||||
/**
|
||||
* @deprecated
|
||||
* `ua` has been removed in favour of \`userAgent\` function.
|
||||
* Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
|
||||
*/
|
||||
get ua(): void;
|
||||
get url(): string;
|
||||
}
|
||||
export interface RequestInit extends globalThis.RequestInit {
|
||||
geo?: {
|
||||
city?: string;
|
||||
country?: string;
|
||||
region?: string;
|
||||
};
|
||||
ip?: string;
|
||||
nextConfig?: {
|
||||
basePath?: string;
|
||||
i18n?: I18NConfig | null;
|
||||
trailingSlash?: boolean;
|
||||
};
|
||||
}
|
||||
82
kitabcitab/node_modules/next/dist/server/web/spec-extension/request.js
generated
vendored
Normal file
82
kitabcitab/node_modules/next/dist/server/web/spec-extension/request.js
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.INTERNALS = void 0;
|
||||
var _nextUrl = require("../next-url");
|
||||
var _utils = require("../utils");
|
||||
var _error = require("../error");
|
||||
var _cookies = require("./cookies");
|
||||
const INTERNALS = Symbol("internal request");
|
||||
exports.INTERNALS = INTERNALS;
|
||||
class NextRequest extends Request {
|
||||
constructor(input, init = {}){
|
||||
const url = typeof input !== "string" && "url" in input ? input.url : String(input);
|
||||
(0, _utils).validateURL(url);
|
||||
super(url, init);
|
||||
this[INTERNALS] = {
|
||||
cookies: new _cookies.RequestCookies(this.headers),
|
||||
geo: init.geo || {},
|
||||
ip: init.ip,
|
||||
url: new _nextUrl.NextURL(url, {
|
||||
headers: (0, _utils).toNodeHeaders(this.headers),
|
||||
nextConfig: init.nextConfig
|
||||
})
|
||||
};
|
||||
}
|
||||
[Symbol.for("edge-runtime.inspect.custom")]() {
|
||||
return {
|
||||
cookies: this.cookies,
|
||||
geo: this.geo,
|
||||
ip: this.ip,
|
||||
nextUrl: this.nextUrl,
|
||||
url: this.url,
|
||||
// rest of props come from Request
|
||||
bodyUsed: this.bodyUsed,
|
||||
cache: this.cache,
|
||||
credentials: this.credentials,
|
||||
destination: this.destination,
|
||||
headers: Object.fromEntries(this.headers),
|
||||
integrity: this.integrity,
|
||||
keepalive: this.keepalive,
|
||||
method: this.method,
|
||||
mode: this.mode,
|
||||
redirect: this.redirect,
|
||||
referrer: this.referrer,
|
||||
referrerPolicy: this.referrerPolicy,
|
||||
signal: this.signal
|
||||
};
|
||||
}
|
||||
get cookies() {
|
||||
return this[INTERNALS].cookies;
|
||||
}
|
||||
get geo() {
|
||||
return this[INTERNALS].geo;
|
||||
}
|
||||
get ip() {
|
||||
return this[INTERNALS].ip;
|
||||
}
|
||||
get nextUrl() {
|
||||
return this[INTERNALS].url;
|
||||
}
|
||||
/**
|
||||
* @deprecated
|
||||
* `page` has been deprecated in favour of `URLPattern`.
|
||||
* Read more: https://nextjs.org/docs/messages/middleware-request-page
|
||||
*/ get page() {
|
||||
throw new _error.RemovedPageError();
|
||||
}
|
||||
/**
|
||||
* @deprecated
|
||||
* `ua` has been removed in favour of \`userAgent\` function.
|
||||
* Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
|
||||
*/ get ua() {
|
||||
throw new _error.RemovedUAError();
|
||||
}
|
||||
get url() {
|
||||
return this[INTERNALS].url.toString();
|
||||
}
|
||||
}
|
||||
exports.NextRequest = NextRequest;
|
||||
|
||||
//# sourceMappingURL=request.js.map
|
||||
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/request.js.map
generated
vendored
Normal file
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/request.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../server/web/spec-extension/request.ts"],"names":["INTERNALS","Symbol","NextRequest","Request","constructor","input","init","url","String","validateURL","cookies","RequestCookies","headers","geo","ip","NextURL","toNodeHeaders","nextConfig","for","nextUrl","bodyUsed","cache","credentials","destination","Object","fromEntries","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","page","RemovedPageError","ua","RemovedUAError","toString"],"mappings":"AAAA;;;;;AAEwB,IAAA,QAAa,WAAb,aAAa,CAAA;AACM,IAAA,MAAU,WAAV,UAAU,CAAA;AACJ,IAAA,MAAU,WAAV,UAAU,CAAA;AAC5B,IAAA,QAAW,WAAX,WAAW,CAAA;AAEnC,MAAMA,SAAS,GAAGC,MAAM,CAAC,kBAAkB,CAAC;QAAtCD,SAAS,GAATA,SAAS;AAEf,MAAME,WAAW,SAASC,OAAO;IAQtCC,YAAYC,KAAwB,EAAEC,IAAiB,GAAG,EAAE,CAAE;QAC5D,MAAMC,GAAG,GACP,OAAOF,KAAK,KAAK,QAAQ,IAAI,KAAK,IAAIA,KAAK,GAAGA,KAAK,CAACE,GAAG,GAAGC,MAAM,CAACH,KAAK,CAAC;QACzEI,CAAAA,GAAAA,MAAW,AAAK,CAAA,YAAL,CAACF,GAAG,CAAC;QAChB,KAAK,CAACA,GAAG,EAAED,IAAI,CAAC;QAChB,IAAI,CAACN,SAAS,CAAC,GAAG;YAChBU,OAAO,EAAE,IAAIC,QAAc,eAAA,CAAC,IAAI,CAACC,OAAO,CAAC;YACzCC,GAAG,EAAEP,IAAI,CAACO,GAAG,IAAI,EAAE;YACnBC,EAAE,EAAER,IAAI,CAACQ,EAAE;YACXP,GAAG,EAAE,IAAIQ,QAAO,QAAA,CAACR,GAAG,EAAE;gBACpBK,OAAO,EAAEI,CAAAA,GAAAA,MAAa,AAAc,CAAA,cAAd,CAAC,IAAI,CAACJ,OAAO,CAAC;gBACpCK,UAAU,EAAEX,IAAI,CAACW,UAAU;aAC5B,CAAC;SACH;KACF;IAED,CAAChB,MAAM,CAACiB,GAAG,CAAC,6BAA6B,CAAC,CAAC,GAAG;QAC5C,OAAO;YACLR,OAAO,EAAE,IAAI,CAACA,OAAO;YACrBG,GAAG,EAAE,IAAI,CAACA,GAAG;YACbC,EAAE,EAAE,IAAI,CAACA,EAAE;Y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AAQ,EAAE,CAAA;KACtC;CACF;QArFYpC,WAAW,GAAXA,WAAW"}
|
||||
37
kitabcitab/node_modules/next/dist/server/web/spec-extension/response.d.ts
generated
vendored
Normal file
37
kitabcitab/node_modules/next/dist/server/web/spec-extension/response.d.ts
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
import type { I18NConfig } from '../../config-shared';
|
||||
import { NextURL } from '../next-url';
|
||||
import { ResponseCookies } from './cookies';
|
||||
declare const INTERNALS: unique symbol;
|
||||
export declare class NextResponse extends Response {
|
||||
[INTERNALS]: {
|
||||
cookies: ResponseCookies;
|
||||
url?: NextURL;
|
||||
};
|
||||
constructor(body?: BodyInit | null, init?: ResponseInit);
|
||||
get cookies(): ResponseCookies;
|
||||
static json(body: any, init?: ResponseInit): NextResponse;
|
||||
static redirect(url: string | NextURL | URL, init?: number | ResponseInit): NextResponse;
|
||||
static rewrite(destination: string | NextURL | URL, init?: MiddlewareResponseInit): NextResponse;
|
||||
static next(init?: MiddlewareResponseInit): NextResponse;
|
||||
}
|
||||
interface ResponseInit extends globalThis.ResponseInit {
|
||||
nextConfig?: {
|
||||
basePath?: string;
|
||||
i18n?: I18NConfig;
|
||||
trailingSlash?: boolean;
|
||||
};
|
||||
url?: string;
|
||||
}
|
||||
interface ModifiedRequest {
|
||||
/**
|
||||
* If this is set, the request headers will be overridden with this value.
|
||||
*/
|
||||
headers?: Headers;
|
||||
}
|
||||
interface MiddlewareResponseInit extends globalThis.ResponseInit {
|
||||
/**
|
||||
* These fields will override the request from clients.
|
||||
*/
|
||||
request?: ModifiedRequest;
|
||||
}
|
||||
export {};
|
||||
99
kitabcitab/node_modules/next/dist/server/web/spec-extension/response.js
generated
vendored
Normal file
99
kitabcitab/node_modules/next/dist/server/web/spec-extension/response.js
generated
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _nextUrl = require("../next-url");
|
||||
var _utils = require("../utils");
|
||||
var _cookies = require("./cookies");
|
||||
const INTERNALS = Symbol("internal response");
|
||||
const REDIRECTS = new Set([
|
||||
301,
|
||||
302,
|
||||
303,
|
||||
307,
|
||||
308
|
||||
]);
|
||||
function handleMiddlewareField(init, headers) {
|
||||
var ref;
|
||||
if (init == null ? void 0 : (ref = init.request) == null ? void 0 : ref.headers) {
|
||||
if (!(init.request.headers instanceof Headers)) {
|
||||
throw new Error("request.headers must be an instance of Headers");
|
||||
}
|
||||
const keys = [];
|
||||
for (const [key, value] of init.request.headers){
|
||||
headers.set("x-middleware-request-" + key, value);
|
||||
keys.push(key);
|
||||
}
|
||||
headers.set("x-middleware-override-headers", keys.join(","));
|
||||
}
|
||||
}
|
||||
class NextResponse extends Response {
|
||||
constructor(body, init = {}){
|
||||
super(body, init);
|
||||
this[INTERNALS] = {
|
||||
cookies: new _cookies.ResponseCookies(this.headers),
|
||||
url: init.url ? new _nextUrl.NextURL(init.url, {
|
||||
headers: (0, _utils).toNodeHeaders(this.headers),
|
||||
nextConfig: init.nextConfig
|
||||
}) : undefined
|
||||
};
|
||||
}
|
||||
[Symbol.for("edge-runtime.inspect.custom")]() {
|
||||
return {
|
||||
cookies: this.cookies,
|
||||
url: this.url,
|
||||
// rest of props come from Response
|
||||
body: this.body,
|
||||
bodyUsed: this.bodyUsed,
|
||||
headers: Object.fromEntries(this.headers),
|
||||
ok: this.ok,
|
||||
redirected: this.redirected,
|
||||
status: this.status,
|
||||
statusText: this.statusText,
|
||||
type: this.type
|
||||
};
|
||||
}
|
||||
get cookies() {
|
||||
return this[INTERNALS].cookies;
|
||||
}
|
||||
static json(body, init) {
|
||||
// @ts-expect-error This is not in lib/dom right now, and we can't augment it.
|
||||
const response = Response.json(body, init);
|
||||
return new NextResponse(response.body, response);
|
||||
}
|
||||
static redirect(url, init) {
|
||||
const status = typeof init === "number" ? init : (init == null ? void 0 : init.status) ?? 307;
|
||||
if (!REDIRECTS.has(status)) {
|
||||
throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');
|
||||
}
|
||||
const initObj = typeof init === "object" ? init : {};
|
||||
const headers = new Headers(initObj == null ? void 0 : initObj.headers);
|
||||
headers.set("Location", (0, _utils).validateURL(url));
|
||||
return new NextResponse(null, {
|
||||
...initObj,
|
||||
headers,
|
||||
status
|
||||
});
|
||||
}
|
||||
static rewrite(destination, init) {
|
||||
const headers = new Headers(init == null ? void 0 : init.headers);
|
||||
headers.set("x-middleware-rewrite", (0, _utils).validateURL(destination));
|
||||
handleMiddlewareField(init, headers);
|
||||
return new NextResponse(null, {
|
||||
...init,
|
||||
headers
|
||||
});
|
||||
}
|
||||
static next(init) {
|
||||
const headers = new Headers(init == null ? void 0 : init.headers);
|
||||
headers.set("x-middleware-next", "1");
|
||||
handleMiddlewareField(init, headers);
|
||||
return new NextResponse(null, {
|
||||
...init,
|
||||
headers
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.NextResponse = NextResponse;
|
||||
|
||||
//# sourceMappingURL=response.js.map
|
||||
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/response.js.map
generated
vendored
Normal file
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/response.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../server/web/spec-extension/response.ts"],"names":["INTERNALS","Symbol","REDIRECTS","Set","handleMiddlewareField","init","headers","request","Headers","Error","keys","key","value","set","push","join","NextResponse","Response","constructor","body","cookies","ResponseCookies","url","NextURL","toNodeHeaders","nextConfig","undefined","for","bodyUsed","Object","fromEntries","ok","redirected","status","statusText","type","json","response","redirect","has","RangeError","initObj","validateURL","rewrite","destination","next"],"mappings":"AAAA;;;;AACwB,IAAA,QAAa,WAAb,aAAa,CAAA;AACM,IAAA,MAAU,WAAV,UAAU,CAAA;AAErB,IAAA,QAAW,WAAX,WAAW,CAAA;AAE3C,MAAMA,SAAS,GAAGC,MAAM,CAAC,mBAAmB,CAAC;AAC7C,MAAMC,SAAS,GAAG,IAAIC,GAA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YAAY,GAAZA,YAAY"}
|
||||
30
kitabcitab/node_modules/next/dist/server/web/spec-extension/user-agent.d.ts
generated
vendored
Normal file
30
kitabcitab/node_modules/next/dist/server/web/spec-extension/user-agent.d.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
interface UserAgent {
|
||||
isBot: boolean;
|
||||
ua: string;
|
||||
browser: {
|
||||
name?: string;
|
||||
version?: string;
|
||||
};
|
||||
device: {
|
||||
model?: string;
|
||||
type?: string;
|
||||
vendor?: string;
|
||||
};
|
||||
engine: {
|
||||
name?: string;
|
||||
version?: string;
|
||||
};
|
||||
os: {
|
||||
name?: string;
|
||||
version?: string;
|
||||
};
|
||||
cpu: {
|
||||
architecture?: string;
|
||||
};
|
||||
}
|
||||
export declare function isBot(input: string): boolean;
|
||||
export declare function userAgentFromString(input: string | undefined): UserAgent;
|
||||
export declare function userAgent({ headers }: {
|
||||
headers: Headers;
|
||||
}): UserAgent;
|
||||
export {};
|
||||
27
kitabcitab/node_modules/next/dist/server/web/spec-extension/user-agent.js
generated
vendored
Normal file
27
kitabcitab/node_modules/next/dist/server/web/spec-extension/user-agent.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.isBot = isBot;
|
||||
exports.userAgentFromString = userAgentFromString;
|
||||
exports.userAgent = userAgent;
|
||||
var _uaParserJs = _interopRequireDefault(require("next/dist/compiled/ua-parser-js"));
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
function isBot(input) {
|
||||
return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input);
|
||||
}
|
||||
function userAgentFromString(input) {
|
||||
return {
|
||||
...(0, _uaParserJs).default(input),
|
||||
isBot: input === undefined ? false : isBot(input)
|
||||
};
|
||||
}
|
||||
function userAgent({ headers }) {
|
||||
return userAgentFromString(headers.get("user-agent") || undefined);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=user-agent.js.map
|
||||
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/user-agent.js.map
generated
vendored
Normal file
1
kitabcitab/node_modules/next/dist/server/web/spec-extension/user-agent.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../server/web/spec-extension/user-agent.ts"],"names":["isBot","userAgentFromString","userAgent","input","test","parseua","undefined","headers","get"],"mappings":"AAAA;;;;QA2BgBA,KAAK,GAALA,KAAK;QAMLC,mBAAmB,GAAnBA,mBAAmB;QAOnBC,SAAS,GAATA,SAAS;AAxCL,IAAA,WAAiC,kCAAjC,iCAAiC,EAAA;;;;;;AA2B9C,SAASF,KAAK,CAACG,KAAa,EAAW;IAC5C,OAAO,oVAAoVC,IAAI,CAC7VD,KAAK,CACN,CAAA;CACF;AAEM,SAASF,mBAAmB,CAACE,KAAyB,EAAa;IACxE,OAAO;QACL,GAAGE,CAAAA,GAAAA,WAAO,AAAO,CAAA,QAAP,CAACF,KAAK,CAAC;QACjBH,KAAK,EAAEG,KAAK,KAAKG,SAAS,GAAG,KAAK,GAAGN,KAAK,CAACG,KAAK,CAAC;KAClD,CAAA;CACF;AAEM,SAASD,SAAS,CAAC,EAAEK,OAAO,CAAA,EAAwB,EAAa;IACtE,OAAON,mBAAmB,CAACM,OAAO,CAACC,GAAG,CAAC,YAAY,CAAC,IAAIF,SAAS,CAAC,CAAA;CACnE"}
|
||||
Reference in New Issue
Block a user