code stringlengths 24 2.07M | docstring stringlengths 25 85.3k | func_name stringlengths 1 92 | language stringclasses 1
value | repo stringlengths 5 64 | path stringlengths 4 172 | url stringlengths 44 218 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
async function next_bundle_app_prod_turbo(task, opts) {
await task.source('dist').webpack({
watch: opts.dev,
config: require('./next-runtime.webpack-config')({
turbo: true,
bundleType: 'app',
}),
name: 'next-bundle-app-prod-turbo',
})
} | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | next_bundle_app_prod_turbo | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
async function next_bundle_app_prod(task, opts) {
await task.source('dist').webpack({
watch: opts.dev,
config: require('./next-runtime.webpack-config')({
dev: false,
bundleType: 'app',
}),
name: 'next-bundle-app-prod',
})
} | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | next_bundle_app_prod | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
async function next_bundle_app_dev_turbo(task, opts) {
await task.source('dist').webpack({
watch: opts.dev,
config: require('./next-runtime.webpack-config')({
turbo: true,
dev: true,
bundleType: 'app',
}),
name: 'next-bundle-app-dev-turbo',
})
} | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | next_bundle_app_dev_turbo | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
async function next_bundle_app_dev(task, opts) {
await task.source('dist').webpack({
watch: opts.dev,
config: require('./next-runtime.webpack-config')({
dev: true,
bundleType: 'app',
}),
name: 'next-bundle-app-dev',
})
} | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | next_bundle_app_dev | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
async function next_bundle_app_prod_turbo_experimental(task, opts) {
await task.source('dist').webpack({
watch: opts.dev,
config: require('./next-runtime.webpack-config')({
turbo: true,
bundleType: 'app',
experimental: true,
}),
name: 'next-bundle-app-prod-turbo-experimental',
})
} | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | next_bundle_app_prod_turbo_experimental | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
async function next_bundle_app_prod_experimental(task, opts) {
await task.source('dist').webpack({
watch: opts.dev,
config: require('./next-runtime.webpack-config')({
dev: false,
bundleType: 'app',
experimental: true,
}),
name: 'next-bundle-app-prod-experimental',
})
} | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | next_bundle_app_prod_experimental | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
async function next_bundle_app_dev_turbo_experimental(task, opts) {
await task.source('dist').webpack({
watch: opts.dev,
config: require('./next-runtime.webpack-config')({
turbo: true,
dev: true,
bundleType: 'app',
experimental: true,
}),
name: 'next-bundle-app-dev-turbo-experi... | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | next_bundle_app_dev_turbo_experimental | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
async function next_bundle_app_dev_experimental(task, opts) {
await task.source('dist').webpack({
watch: opts.dev,
config: require('./next-runtime.webpack-config')({
dev: true,
bundleType: 'app',
experimental: true,
}),
name: 'next-bundle-app-dev-experimental',
})
} | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | next_bundle_app_dev_experimental | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
async function next_bundle_pages_prod(task, opts) {
await task.source('dist').webpack({
watch: opts.dev,
config: require('./next-runtime.webpack-config')({
dev: false,
bundleType: 'pages',
}),
name: 'next-bundle-pages-prod',
})
} | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | next_bundle_pages_prod | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
async function next_bundle_pages_dev(task, opts) {
await task.source('dist').webpack({
watch: opts.dev,
config: require('./next-runtime.webpack-config')({
dev: true,
bundleType: 'pages',
}),
name: 'next-bundle-pages-dev',
})
} | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | next_bundle_pages_dev | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
async function next_bundle_pages_prod_turbo(task, opts) {
await task.source('dist').webpack({
watch: opts.dev,
config: require('./next-runtime.webpack-config')({
turbo: true,
bundleType: 'pages',
}),
name: 'next-bundle-pages-prod-turbo',
})
} | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | next_bundle_pages_prod_turbo | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
async function next_bundle_pages_dev_turbo(task, opts) {
await task.source('dist').webpack({
watch: opts.dev,
config: require('./next-runtime.webpack-config')({
turbo: true,
dev: true,
bundleType: 'pages',
}),
name: 'next-bundle-pages-dev-turbo',
})
} | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | next_bundle_pages_dev_turbo | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
async function next_bundle_server(task, opts) {
await task.source('dist').webpack({
watch: opts.dev,
config: require('./next-runtime.webpack-config')({
dev: false,
bundleType: 'server',
}),
name: 'next-bundle-server',
})
} | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | next_bundle_server | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
async function next_bundle_devtools(task, opts) {
await task.source('dist').webpack({
watch: opts.dev,
config: require('./next-devtools.webpack-config')({
dev: opts.dev,
}),
name: 'next-bundle-devtools-dev',
})
} | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | next_bundle_devtools | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
async function next_bundle(task, opts) {
await task.parallel(
[
// builds the app (route/page) bundles
'next_bundle_app_prod_turbo',
'next_bundle_app_prod',
'next_bundle_app_dev_turbo',
'next_bundle_app_dev',
// builds the app (route/page) bundles with react experimental
... | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | next_bundle | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
function writeJson(file, obj, { spaces = 0 } = {}) {
return fs.writeFile(
file,
JSON.stringify(obj, null, spaces) + (spaces === 0 ? '\n' : '')
)
} | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | writeJson | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
function rmrf(path, options) {
return fs.rm(path, { recursive: true, force: true, ...options })
} | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | rmrf | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
function readJson(path) {
return fs.readFile(path, 'utf8').then((content) => JSON.parse(content))
} | /*.+(wasm)').target('dist/server')
}
export async function experimental_testing(task, opts) {
await task
.source('src/experimental/testing/* | readJson | javascript | vercel/next.js | packages/next/taskfile.js | https://github.com/vercel/next.js/blob/master/packages/next/taskfile.js | MIT |
function pluginCreator() {
return {
postcssPlugin: 'postcss-plugin-stub',
prepare() {
return {}
},
}
} | This file creates a stub postcss plugin
It will be pre-compiled into "src/compiled/postcss-plugin-stub-for-cssnano-simple",
which "postcss-svgo" will be aliased to when creating "cssnano-preset-simple" | pluginCreator | javascript | vercel/next.js | packages/next/src/bundles/postcss-plugin-stub/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/bundles/postcss-plugin-stub/index.js | MIT |
prepare() {
return {}
} | This file creates a stub postcss plugin
It will be pre-compiled into "src/compiled/postcss-plugin-stub-for-cssnano-simple",
which "postcss-svgo" will be aliased to when creating "cssnano-preset-simple" | prepare | javascript | vercel/next.js | packages/next/src/bundles/postcss-plugin-stub/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/bundles/postcss-plugin-stub/index.js | MIT |
get size() {
return this._parsed.size;
} | The amount of cookies received from the client | size | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
get(...args) {
const name = typeof args[0] === "string" ? args[0] : args[0].name;
return this._parsed.get(name);
} | The amount of cookies received from the client | get | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
getAll(...args) {
var _a;
const all = Array.from(this._parsed);
if (!args.length) {
return all.map(([_, value]) => value);
}
const name = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;
return all.filter(([n]) => n === name).map(([_, value]) => value);
... | The amount of cookies received from the client | getAll | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
has(name) {
return this._parsed.has(name);
} | The amount of cookies received from the client | has | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
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(([_, value2]) => stringifyCookie(value2)).join("; ")
);
return this;
} | The amount of cookies received from the client | set | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
delete(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]) => stringifyCookie(value)).join("; ")
);
return result;
} | Delete the cookies matching the passed name or names in the request. | delete | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
clear() {
this.delete(Array.from(this._parsed.keys()));
return this;
} | Delete all the cookies in the cookies in the request. | clear | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
toString() {
return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join("; ");
} | Format the cookies in the request as a string for logging | toString | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
constructor(responseHeaders) {
/** @internal */
this._parsed = /* @__PURE__ */ new Map();
var _a, _b, _c;
this._headers = responseHeaders;
const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get("set-cookie")) ... | Format the cookies in the request as a string for logging | constructor | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
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-get CookieStore#get} without the Promise. | get | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
getAll(...args) {
var _a;
const all = Array.from(this._parsed.values());
if (!args.length) {
return all;
}
const key = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;
return all.filter((c) => c.name === key);
} | {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise. | getAll | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
has(name) {
return this._parsed.has(name);
} | {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise. | has | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
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-set CookieStore#set} without the Promise. | set | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
delete(...args) {
const [name, options] = typeof args[0] === "string" ? [args[0]] : [args[0].name, args[0]];
return this.set({ ...options, name, value: "", expires: /* @__PURE__ */ new Date(0) });
} | {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise. | delete | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
toString() {
return [...this._parsed.values()].map(stringifyCookie).join("; ");
} | {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise. | toString | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
function replace(bag, headers) {
headers.delete("set-cookie");
for (const [, value] of bag) {
const serialized = stringifyCookie(value);
headers.append("set-cookie", serialized);
}
} | {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise. | replace | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
function normalizeCookie(cookie = { name: "", value: "" }) {
if (typeof cookie.expires === "number") {
cookie.expires = new Date(cookie.expires);
}
if (cookie.maxAge) {
cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3);
}
if (cookie.path === null || cookie.path === void 0) {
cookie.path ... | {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise. | normalizeCookie | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/cookies/index.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/cookies/index.js | MIT |
constructor(key, value, index) {
if (index === void 0 || index >= key.length) {
throw new TypeError("Unreachable");
}
const code = this.code = key.charCodeAt(index);
if (code > 127) {
throw new TypeError("key must be ascii string");
}
if (key.length !=... | @param {string} key
@param {any} value
@param {number} index | constructor | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
add(key, value) {
const length = key.length;
if (length === 0) {
throw new TypeError("Unreachable");
}
let index = 0;
let node = this;
while (true) {
const code = key.charCodeAt(index);
if (code > 127) {
throw new TypeError("key m... | @param {string} key
@param {any} value | add | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
insert(key, value) {
if (this.node === null) {
this.node = new TstNode(key, value, 0);
} else {
this.node.add(key, value);
}
} | @param {string} key
@param {any} value | insert | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
constructor(callback, delay, arg) {
this._onTimeout = callback;
this._idleTimeout = delay;
this._timerArg = arg;
this.refresh();
} | @constructor
@param {Function} callback A function to be executed after the timer
expires.
@param {number} delay The time, in milliseconds that the timer should wait
before the specified function or code is executed.
@param {*} arg | constructor | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
refresh() {
if (this._state === NOT_IN_LIST) {
fastTimers.push(this);
}
if (!fastNowTimeout || fastTimers.length === 1) {
refreshTimeout();
}
this._state = PENDING;
} | Sets the timer's start time to the current time, and reschedules the timer
to call its callback at the previously specified duration adjusted to the
current time.
Using this on a timer that has already called its callback will reactivate
the timer.
@returns {void} | refresh | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
clear() {
this._state = TO_BE_CLEARED;
this._idleStart = -1;
} | The `clear` method cancels the timer, preventing it from executing.
@returns {void}
@private | clear | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
setTimeout(callback, delay, arg) {
return delay <= RESOLUTION_MS ? setTimeout(callback, delay, arg) : new FastTimer(callback, delay, arg);
} | The setTimeout() method sets a timer which executes a function once the
timer expires.
@param {Function} callback A function to be executed after the timer
expires.
@param {number} delay The time, in milliseconds that the timer should
wait before the specified function or code is executed.
@param {*} [arg] An optional ... | setTimeout | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
clearTimeout(timeout) {
if (timeout[kFastTimer]) {
timeout.clear();
} else {
clearTimeout(timeout);
}
} | The clearTimeout method cancels an instantiated Timer previously created
by calling setTimeout.
@param {NodeJS.Timeout|FastTimer} timeout | clearTimeout | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
setFastTimeout(callback, delay, arg) {
return new FastTimer(callback, delay, arg);
} | The setFastTimeout() method sets a fastTimer which executes a function once
the timer expires.
@param {Function} callback A function to be executed after the timer
expires.
@param {number} delay The time, in milliseconds that the timer should
wait before the specified function or code is executed.
@param {*} [arg] An o... | setFastTimeout | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
now() {
return fastNow;
} | The now method returns the value of the internal fast timer clock.
@returns {number} | now | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
tick(delay = 0) {
fastNow += delay - RESOLUTION_MS + 1;
onTick();
onTick();
} | Trigger the onTick function to process the fastTimers array.
Exported for testing purposes only.
Marking as deprecated to discourage any use outside of testing.
@deprecated
@param {number} [delay=0] The delay in milliseconds to add to the now value. | tick | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
reset() {
fastNow = 0;
fastTimers.length = 0;
clearTimeout(fastNowTimeout);
fastNowTimeout = null;
} | Reset FastTimers.
Exported for testing purposes only.
Marking as deprecated to discourage any use outside of testing.
@deprecated | reset | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
constructor(maxCachedSessions) {
this._maxCachedSessions = maxCachedSessions;
this._sessionCache = /* @__PURE__ */ new Map();
this._sessionRegistry = new global.FinalizationRegistry((key) => {
if (this._sessionCache.size < this._maxCachedSessions) {
return;
... | Exporting for testing purposes only.
Marking as deprecated to discourage any use outside of testing.
@deprecated | constructor | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
get(sessionKey) {
const ref = this._sessionCache.get(sessionKey);
return ref ? ref.deref() : null;
} | Exporting for testing purposes only.
Marking as deprecated to discourage any use outside of testing.
@deprecated | get | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
set(sessionKey, session) {
if (this._maxCachedSessions === 0) {
return;
}
this._sessionCache.set(sessionKey, new WeakRef(session));
this._sessionRegistry.register(session, sessionKey);
} | Exporting for testing purposes only.
Marking as deprecated to discourage any use outside of testing.
@deprecated | set | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
constructor(maxCachedSessions) {
this._maxCachedSessions = maxCachedSessions;
this._sessionCache = /* @__PURE__ */ new Map();
} | Exporting for testing purposes only.
Marking as deprecated to discourage any use outside of testing.
@deprecated | constructor | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
get(sessionKey) {
return this._sessionCache.get(sessionKey);
} | Exporting for testing purposes only.
Marking as deprecated to discourage any use outside of testing.
@deprecated | get | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
set(sessionKey, session) {
if (this._maxCachedSessions === 0) {
return;
}
if (this._sessionCache.size >= this._maxCachedSessions) {
const { value: oldestKey } = this._sessionCache.keys().next();
this._sessionCache.delete(oldestKey);
}
... | Exporting for testing purposes only.
Marking as deprecated to discourage any use outside of testing.
@deprecated | set | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) {
if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) {
throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero");
... | Exporting for testing purposes only.
Marking as deprecated to discourage any use outside of testing.
@deprecated | buildConnector | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
function onConnectTimeout(socket, opts) {
if (socket == null) {
return;
}
let message = "Connect Timeout Error";
if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) {
message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")},`;
} e... | Exporting for testing purposes only.
Marking as deprecated to discourage any use outside of testing.
@deprecated | onConnectTimeout | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
function enumToMap(obj) {
const res = {};
Object.keys(obj).forEach((key) => {
const value = obj[key];
if (typeof value === "number") {
res[key] = value;
}
});
return res;
} | Exporting for testing purposes only.
Marking as deprecated to discourage any use outside of testing.
@deprecated | enumToMap | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
constructor(target, kind) {
/** @type {any} */
__privateAdd(this, _target, void 0);
/** @type {'key' | 'value' | 'key+value'} */
__privateAdd(this, _kind, void 0);
/** @type {number} */
__privateAdd(this, _index, void 0);
__privateSet(this, _target, ... | @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object
@param {unknown} target
@param {'key' | 'value' | 'key+value'} kind | constructor | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
constructor(url, {
interceptors,
maxHeaderSize,
headersTimeout,
socketTimeout,
requestTimeout,
connectTimeout,
bodyTimeout,
idleTimeout,
keepAlive,
keepAliveTimeout,
maxKeepAliveTimeout,
keepAliveMaxTimeout,
keepAliv... | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | constructor | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
get pipelining() {
return this[kPipelining];
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | pipelining | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
set pipelining(value) {
this[kPipelining] = value;
this[kResume](true);
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | pipelining | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
function onError(client, err) {
if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") {
assert(client[kPendingIdx] === client[kRunningIdx]);
const requests = client[kQueue].splice(client[kRunningIdx]);
for (let i = 0; i < requests.length; i++) {
... | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | onError | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
async function connect(client) {
assert(!client[kConnecting]);
assert(!client[kHTTPContext]);
let { host, hostname, protocol, port } = client[kUrl];
if (hostname[0] === "[") {
const idx = hostname.indexOf("]");
assert(idx !== -1);
const ip = hostname.substring(1, idx);
... | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | connect | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
function emitDrain(client) {
client[kNeedDrain] = 0;
client.emit("drain", client[kUrl], [client]);
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | emitDrain | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
function resume(client, sync) {
if (client[kResuming] === 2) {
return;
}
client[kResuming] = 2;
_resume(client, sync);
client[kResuming] = 0;
if (client[kRunningIdx] > 256) {
client[kQueue].splice(0, client[kRunningIdx]);
client[kPendingIdx] -= client[kRunning... | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | resume | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
function _resume(client, sync) {
while (true) {
if (client.destroyed) {
assert(client[kPending] === 0);
return;
}
if (client[kClosedResolve] && !client[kSize]) {
client[kClosedResolve]();
client[kClosedResolve] = null;
return;
}
... | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | _resume | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
constructor() {
this.bottom = 0;
this.top = 0;
this.list = new Array(kSize);
this.next = null;
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | constructor | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
isEmpty() {
return this.top === this.bottom;
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | isEmpty | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
isFull() {
return (this.top + 1 & kMask) === this.bottom;
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | isFull | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
push(data) {
this.list[this.top] = data;
this.top = this.top + 1 & kMask;
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | push | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
shift() {
const nextItem = this.list[this.bottom];
if (nextItem === void 0)
return null;
this.list[this.bottom] = void 0;
this.bottom = this.bottom + 1 & kMask;
return nextItem;
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | shift | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
constructor() {
this.head = this.tail = new FixedCircularBuffer();
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | constructor | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
isEmpty() {
return this.head.isEmpty();
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | isEmpty | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
push(data) {
if (this.head.isFull()) {
this.head = this.head.next = new FixedCircularBuffer();
}
this.head.push(data);
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | push | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
shift() {
const tail = this.tail;
const next = tail.shift();
if (tail.isEmpty() && tail.next !== null) {
this.tail = tail.next;
}
return next;
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | shift | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
constructor(pool) {
this[kPool] = pool;
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | constructor | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
get connected() {
return this[kPool][kConnected];
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | connected | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
get free() {
return this[kPool][kFree];
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | free | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
get pending() {
return this[kPool][kPending];
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | pending | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
get queued() {
return this[kPool][kQueued];
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | queued | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
get running() {
return this[kPool][kRunning];
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | running | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
get size() {
return this[kPool][kSize];
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | size | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
constructor() {
super();
this[kQueue] = new FixedQueue();
this[kClients] = [];
this[kQueued] = 0;
const pool = this;
this[kOnDrain] = /* @__PURE__ */ __name(function onDrain(origin, targets) {
const queue = pool[kQueue];
let needDrain = false;
... | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | constructor | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
get stats() {
return this[kStats];
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | stats | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
function defaultFactory(origin, opts) {
return new Client(origin, opts);
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | defaultFactory | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
constructor(origin, {
connections,
factory = defaultFactory,
connect,
connectTimeout,
tls,
maxCachedSessions,
socketPath,
autoSelectFamily,
autoSelectFamilyAttemptTimeout,
allowH2,
...options
} = {}) {
super();
... | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | constructor | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
function getGreatestCommonDivisor(a, b) {
if (a === 0)
return b;
while (b !== 0) {
const t = b;
b = a % b;
a = t;
}
return a;
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | getGreatestCommonDivisor | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
function defaultFactory(origin, opts) {
return new Pool(origin, opts);
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | defaultFactory | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) {
super();
this[kOptions] = opts;
this[kIndex] = -1;
this[kCurrentWeight] = 0;
this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100;
this[kErrorPenalty] = this[kOptions].errorPenalty |... | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | constructor | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
addUpstream(upstream) {
const upstreamOrigin = parseOrigin(upstream).origin;
if (this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true)) {
return this;
}
const pool = this[kFactory](upstreamOrigin, Object.assig... | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | addUpstream | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
_updateBalancedPoolStats() {
let result = 0;
for (let i = 0; i < this[kClients].length; i++) {
result = getGreatestCommonDivisor(this[kClients][i][kWeight], result);
}
this[kGreatestCommonDivisor] = result;
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | _updateBalancedPoolStats | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
removeUpstream(upstream) {
const upstreamOrigin = parseOrigin(upstream).origin;
const pool = this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true);
if (pool) {
this[kRemoveClient](pool);
}
return this;... | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | removeUpstream | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
get upstreams() {
return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl].origin);
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | upstreams | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
function defaultFactory(origin, opts) {
return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts);
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | defaultFactory | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {
super();
if (typeof factory !== "function") {
throw new InvalidArgumentError("factory must be a function.");
}
if (connect != null && typeof connect !== "function" && typeof connect !== "... | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | constructor | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
function defaultProtocolPort(protocol) {
return protocol === "https:" ? 443 : 80;
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | defaultProtocolPort | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
function defaultFactory(origin, opts) {
return new Pool(origin, opts);
} | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | defaultFactory | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
constructor(opts) {
super();
/**
* @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts
* @returns {URL}
*/
__privateAdd(this, _getUrl);
if (!opts || typeof opts === "object" && !(opts instanceof URL2) && !opts.uri) {
throw n... | @param {string|URL} url
@param {import('../../types/client.js').Client.Options} options | constructor | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
dispatch(opts, handler) {
const headers = buildHeaders(opts.headers);
throwIfProxyAuthIsSent(headers);
if (headers && !("host" in headers) && !("Host" in headers)) {
const { host } = new URL2(opts.origin);
headers.host = host;
}
return this[kAgent].dispatch(
... | @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts
@returns {URL} | dispatch | javascript | vercel/next.js | packages/next/src/compiled/@edge-runtime/primitives/fetch.js | https://github.com/vercel/next.js/blob/master/packages/next/src/compiled/@edge-runtime/primitives/fetch.js | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.