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

Function getTimestampPageData

test/e2e/app-dir/next-after-app-deploy/index.test.ts:34–42  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

32 }
33
34 const getTimestampPageData = async (path: string): Promise<PageInfo> => {
35 const fullPath = `/timestamp/key/${encodeURIComponent(path)}`
36 const $ = await next.render$(fullPath)
37 const dataStr = $('#page-info').text()
38 if (!dataStr) {
39 throw new Error(`No page data found for path '${fullPath}'`)
40 }
41 return JSON.parse(dataStr) as PageInfo
42 }
43
44 const getInitialTimestampPageData = async (path: string) => {
45 // FIXME: this seems like a bug in PPR --

Callers 2

index.test.tsFile · 0.85

Calls 5

encodeURIComponentFunction · 0.85
render$Method · 0.80
textMethod · 0.65
$Function · 0.50
parseMethod · 0.45

Tested by

no test coverage detected