MCPcopy
hub / github.com/vercel/next.js / ncc_edge_runtime_cookies

Function ncc_edge_runtime_cookies

packages/next/taskfile.js:336–361  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

334externals['@edge-runtime/cookies'] = 'next/dist/compiled/@edge-runtime/cookies'
335
336export async function ncc_edge_runtime_cookies() {
337 // `@edge-runtime/cookies` is precompiled and pre-bundled
338 // so we vendor the package as it is.
339 const dest = 'src/compiled/@edge-runtime/cookies'
340 const pkg = await readJson(
341 require.resolve('@edge-runtime/cookies/package.json')
342 )
343 await rmrf(dest)
344 await fs.mkdir(dest, { recursive: true })
345
346 await writeJson(join(dest, 'package.json'), {
347 name: '@edge-runtime/cookies',
348 version: pkg.version,
349 main: './index.js',
350 license: pkg.license,
351 })
352
353 await fs.cp(
354 require.resolve('@edge-runtime/cookies/dist/index.js'),
355 join(dest, 'index.js')
356 )
357 await fs.cp(
358 require.resolve('@edge-runtime/cookies/dist/index.d.ts'),
359 join(dest, 'index.d.ts')
360 )
361}
362
363externals['@edge-runtime/primitives'] =
364 'next/dist/compiled/@edge-runtime/primitives'

Callers

nothing calls this directly

Calls 6

rmrfFunction · 0.85
mkdirMethod · 0.80
readJsonFunction · 0.70
writeJsonFunction · 0.70
resolveMethod · 0.65
joinFunction · 0.50

Tested by

no test coverage detected