403Webshell
Server IP : 159.203.156.69  /  Your IP : 216.73.217.172
Web Server : nginx/1.24.0
System : Linux main-ubuntu 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/tanviranik.com/node_modules/vinext/dist/server/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/tanviranik.com/node_modules/vinext/dist/server/app-route-handler-execution.js.map
{"version":3,"file":"app-route-handler-execution.js","names":[],"sources":["../../src/server/app-route-handler-execution.ts"],"sourcesContent":["import type { NextI18nConfig } from \"../config/next-config.js\";\nimport { setHeadersContext, type HeadersAccessPhase } from \"vinext/shims/headers\";\nimport type { ExecutionContextLike } from \"vinext/shims/request-context\";\nimport type { CachedRouteValue } from \"vinext/shims/cache\";\nimport type { NextRequest } from \"vinext/shims/server\";\nimport {\n  createStaticGenerationHeadersContext,\n  getAppRouteStaticGenerationErrorMessage,\n} from \"./app-static-generation.js\";\nimport {\n  isPossibleAppRouteActionRequest,\n  resolveAppRouteHandlerSpecialError,\n  shouldApplyAppRouteHandlerRevalidateHeader,\n  shouldWriteAppRouteHandlerCache,\n  type AppRouteHandlerModule,\n} from \"./app-route-handler-policy.js\";\nimport {\n  applyRouteHandlerMiddlewareContext,\n  applyRouteHandlerRevalidateHeader,\n  assertSupportedAppRouteHandlerResponse,\n  buildAppRouteCacheValue,\n  finalizeRouteHandlerResponse,\n  markRouteHandlerCacheMiss,\n  type RouteHandlerMiddlewareContext,\n} from \"./app-route-handler-response.js\";\nimport {\n  createTrackedAppRouteRequest,\n  markKnownDynamicAppRoute,\n} from \"./app-route-handler-runtime.js\";\n\nexport type AppRouteParams = Record<string, string | string[]>;\nexport type AppRouteDynamicUsageFn = () => boolean;\nexport type MarkAppRouteDynamicUsageFn = () => void;\nexport type AppRouteHandlerFunction = (\n  request: NextRequest,\n  context: { params: AppRouteParams },\n) => Response | Promise<Response>;\nexport type RouteHandlerCacheSetter = (\n  key: string,\n  data: CachedRouteValue,\n  revalidateSeconds: number,\n  tags: string[],\n  expireSeconds?: number,\n) => Promise<void>;\ntype AppRouteErrorReporter = (\n  error: Error,\n  request: { path: string; method: string; headers: Record<string, string> },\n  route: { routerKind: \"App Router\"; routePath: string; routeType: \"route\" },\n) => void;\nexport type AppRouteDebugLogger = (event: string, detail: string) => void;\n\ntype RunAppRouteHandlerOptions = {\n  basePath?: string;\n  consumeDynamicUsage: AppRouteDynamicUsageFn;\n  dynamicConfig?: string;\n  handlerFn: AppRouteHandlerFunction;\n  i18n?: NextI18nConfig | null;\n  markDynamicUsage: MarkAppRouteDynamicUsageFn;\n  middlewareRequestHeaders?: Headers | null;\n  params: AppRouteParams;\n  request: Request;\n  routePattern?: string;\n  setHeadersAccessPhase?: (phase: HeadersAccessPhase) => HeadersAccessPhase;\n};\n\ntype RunAppRouteHandlerResult = {\n  dynamicUsedInHandler: boolean;\n  response: Response;\n};\n\ntype ExecuteAppRouteHandlerOptions = {\n  buildPageCacheTags: (pathname: string, extraTags: string[]) => string[];\n  clearRequestContext: () => void;\n  cleanPathname: string;\n  executionContext: ExecutionContextLike | null;\n  getAndClearPendingCookies: () => string[];\n  getCollectedFetchTags: () => string[];\n  getDraftModeCookieHeader: () => string | null | undefined;\n  handler: AppRouteHandlerModule;\n  isAutoHead: boolean;\n  isProduction: boolean;\n  isrDebug?: AppRouteDebugLogger;\n  isrRouteKey: (pathname: string) => string;\n  isrSet: RouteHandlerCacheSetter;\n  method: string;\n  middlewareContext: RouteHandlerMiddlewareContext;\n  reportRequestError: AppRouteErrorReporter;\n  expireSeconds?: number;\n  revalidateSeconds: number | null;\n  routePattern: string;\n  setHeadersAccessPhase: (phase: HeadersAccessPhase) => HeadersAccessPhase;\n} & RunAppRouteHandlerOptions;\n\nfunction configureAppRouteStaticGenerationContext(options: RunAppRouteHandlerOptions): void {\n  if (options.dynamicConfig === \"force-static\" || options.dynamicConfig === \"error\") {\n    setHeadersContext(\n      createStaticGenerationHeadersContext({\n        dynamicConfig: options.dynamicConfig,\n        routeKind: \"route\",\n        routePattern: options.routePattern,\n      }),\n    );\n    options.setHeadersAccessPhase?.(\"route-handler\");\n  }\n}\n\nexport async function runAppRouteHandler(\n  options: RunAppRouteHandlerOptions,\n): Promise<RunAppRouteHandlerResult> {\n  options.consumeDynamicUsage();\n  configureAppRouteStaticGenerationContext(options);\n  const trackedRequest = createTrackedAppRouteRequest(options.request, {\n    basePath: options.basePath,\n    i18n: options.i18n,\n    middlewareHeaders: options.middlewareRequestHeaders,\n    onDynamicAccess() {\n      options.markDynamicUsage();\n    },\n    requestMode:\n      options.dynamicConfig === \"force-static\" || options.dynamicConfig === \"error\"\n        ? options.dynamicConfig\n        : \"auto\",\n    staticGenerationErrorMessage(expression) {\n      return getAppRouteStaticGenerationErrorMessage(options.routePattern, expression);\n    },\n  });\n  const response = await options.handlerFn(trackedRequest.request, {\n    params: options.params,\n  });\n\n  return {\n    dynamicUsedInHandler: options.consumeDynamicUsage(),\n    response,\n  };\n}\n\nexport async function executeAppRouteHandler(\n  options: ExecuteAppRouteHandlerOptions,\n): Promise<Response> {\n  const previousHeadersPhase = options.setHeadersAccessPhase(\"route-handler\");\n\n  try {\n    const { dynamicUsedInHandler, response } = await runAppRouteHandler({\n      ...options,\n      dynamicConfig: options.handler.dynamic,\n    });\n    assertSupportedAppRouteHandlerResponse(response);\n    const handlerSetCacheControl = response.headers.has(\"cache-control\");\n\n    if (dynamicUsedInHandler) {\n      markKnownDynamicAppRoute(options.routePattern);\n    }\n\n    if (\n      shouldApplyAppRouteHandlerRevalidateHeader({\n        dynamicUsedInHandler,\n        handlerSetCacheControl,\n        isAutoHead: options.isAutoHead,\n        method: options.method,\n        revalidateSeconds: options.revalidateSeconds,\n      })\n    ) {\n      const revalidateSeconds = options.revalidateSeconds;\n      if (revalidateSeconds == null) {\n        throw new Error(\"Expected route handler revalidate seconds\");\n      }\n      applyRouteHandlerRevalidateHeader(response, revalidateSeconds, options.expireSeconds);\n    }\n\n    if (\n      shouldWriteAppRouteHandlerCache({\n        dynamicConfig: options.handler.dynamic,\n        dynamicUsedInHandler,\n        handlerSetCacheControl,\n        isAutoHead: options.isAutoHead,\n        isProduction: options.isProduction,\n        method: options.method,\n        revalidateSeconds: options.revalidateSeconds,\n      })\n    ) {\n      markRouteHandlerCacheMiss(response);\n      const routeClone = response.clone();\n      const routeKey = options.isrRouteKey(options.cleanPathname);\n      const revalidateSeconds = options.revalidateSeconds;\n      if (revalidateSeconds == null) {\n        throw new Error(\"Expected route handler cache revalidate seconds\");\n      }\n      const routeTags = options.buildPageCacheTags(\n        options.cleanPathname,\n        options.getCollectedFetchTags(),\n      );\n      const routeWritePromise = (async () => {\n        try {\n          const routeCacheValue = await buildAppRouteCacheValue(routeClone);\n          await options.isrSet(\n            routeKey,\n            routeCacheValue,\n            revalidateSeconds,\n            routeTags,\n            options.expireSeconds,\n          );\n          options.isrDebug?.(\"route cache written\", routeKey);\n        } catch (cacheErr) {\n          console.error(\"[vinext] ISR route cache write error:\", cacheErr);\n        }\n      })();\n      options.executionContext?.waitUntil(routeWritePromise);\n    }\n\n    const pendingCookies = options.getAndClearPendingCookies();\n    const draftCookie = options.getDraftModeCookieHeader();\n    options.clearRequestContext();\n\n    return applyRouteHandlerMiddlewareContext(\n      finalizeRouteHandlerResponse(response, {\n        pendingCookies,\n        draftCookie,\n        isHead: options.isAutoHead,\n      }),\n      options.middlewareContext,\n    );\n  } catch (error) {\n    const pendingCookies = options.getAndClearPendingCookies();\n    const draftCookie = options.getDraftModeCookieHeader();\n    const specialError = resolveAppRouteHandlerSpecialError(error, options.request.url, {\n      isAction: isPossibleAppRouteActionRequest(options.request),\n    });\n    options.clearRequestContext();\n\n    if (specialError) {\n      if (specialError.kind === \"redirect\") {\n        return applyRouteHandlerMiddlewareContext(\n          finalizeRouteHandlerResponse(\n            new Response(null, {\n              status: specialError.statusCode,\n              headers: { Location: specialError.location },\n            }),\n            {\n              pendingCookies,\n              draftCookie,\n              isHead: options.isAutoHead,\n            },\n          ),\n          options.middlewareContext,\n        );\n      }\n\n      return applyRouteHandlerMiddlewareContext(\n        new Response(null, { status: specialError.statusCode }),\n        options.middlewareContext,\n      );\n    }\n\n    console.error(\"[vinext] Route handler error:\", error);\n    options.reportRequestError(\n      error instanceof Error ? error : new Error(String(error)),\n      {\n        path: options.cleanPathname,\n        method: options.request.method,\n        headers: Object.fromEntries(options.request.headers.entries()),\n      },\n      {\n        routerKind: \"App Router\",\n        routePath: options.routePattern,\n        routeType: \"route\",\n      },\n    );\n\n    return applyRouteHandlerMiddlewareContext(\n      new Response(null, { status: 500 }),\n      options.middlewareContext,\n    );\n  } finally {\n    options.setHeadersAccessPhase(previousHeadersPhase);\n  }\n}\n"],"mappings":";;;;;;AA6FA,SAAS,yCAAyC,SAA0C;CAC1F,IAAI,QAAQ,kBAAkB,kBAAkB,QAAQ,kBAAkB,SAAS;EACjF,kBACE,qCAAqC;GACnC,eAAe,QAAQ;GACvB,WAAW;GACX,cAAc,QAAQ;GACvB,CAAC,CACH;EACD,QAAQ,wBAAwB,gBAAgB;;;AAIpD,eAAsB,mBACpB,SACmC;CACnC,QAAQ,qBAAqB;CAC7B,yCAAyC,QAAQ;CACjD,MAAM,iBAAiB,6BAA6B,QAAQ,SAAS;EACnE,UAAU,QAAQ;EAClB,MAAM,QAAQ;EACd,mBAAmB,QAAQ;EAC3B,kBAAkB;GAChB,QAAQ,kBAAkB;;EAE5B,aACE,QAAQ,kBAAkB,kBAAkB,QAAQ,kBAAkB,UAClE,QAAQ,gBACR;EACN,6BAA6B,YAAY;GACvC,OAAO,wCAAwC,QAAQ,cAAc,WAAW;;EAEnF,CAAC;CACF,MAAM,WAAW,MAAM,QAAQ,UAAU,eAAe,SAAS,EAC/D,QAAQ,QAAQ,Q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