@superinterface/server 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/eslint/.cache_btwyo7 +1 -1
- package/.next/fallback-build-manifest.json +2 -2
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +1 -1
- package/.next/server/chunks/[root-of-the-server]__0c1bc5ed._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0c1bc5ed._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__25ee13bc._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__25ee13bc._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__27aadac9._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__27aadac9._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__2945c9e9._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__2945c9e9._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__29635e8e._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__29635e8e._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__315f084a._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__315f084a._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__3ba06f7c._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__441cee00._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__441cee00._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__464a4377._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__464a4377._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__4e536bc0._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__4e536bc0._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__51977f30._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__51977f30._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__583a7f1c._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__583a7f1c._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__5abf1160._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__5abf1160._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__5d09614a._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__5d09614a._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__62d958e7._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__62d958e7._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__7f9ca1e3._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__7f9ca1e3._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__83461316._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__83461316._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__9a611d42._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__9a611d42._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__a135e388._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__a135e388._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__b10ec83e._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__b10ec83e._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__c1629392._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__c1629392._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__eb816e13._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__eb816e13._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__09232d18._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__09232d18._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__55cc8360._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__55cc8360._.js.map +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/trace +1 -1
- package/dist/lib/prismaClient.d.ts +5 -0
- package/dist/lib/prismaClient.d.ts.map +1 -0
- package/dist/lib/prismaClient.js +4 -0
- package/package.json +2 -1
- package/scripts/commands/prisma/deploy.ts +32 -5
- package/scripts/utils/loadPrisma.ts +108 -2
- /package/.next/static/{AV1cmwx295lp-1-2s0TpY → ro8zTpWa9gNP9pVyKlucL}/_buildManifest.js +0 -0
- /package/.next/static/{AV1cmwx295lp-1-2s0TpY → ro8zTpWa9gNP9pVyKlucL}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{AV1cmwx295lp-1-2s0TpY → ro8zTpWa9gNP9pVyKlucL}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/cache/cacheHeaders.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/apiKeys/getApiKey.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/misc/isJSON.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/mcpServers/serializeApiMcpServer.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/mcpServers/mcpServerSchema.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/mcp-servers/route.ts","turbopack:///[project]/supercorp/superinterface/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["export const cacheHeaders = {\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',\n 'Access-Control-Allow-Headers': 'Content-Type',\n}\n","import { ApiKeyType, ApiKey } from '@prisma/client'\nimport { validate } from 'uuid'\nimport { prisma } from '@/lib/prisma'\n\nexport const getApiKey = async ({\n authorization,\n type,\n}: {\n authorization: string | null\n type: ApiKeyType\n}): Promise<ApiKey | null> => {\n if (!authorization) {\n return null\n }\n\n const [, apiKeyValue] = authorization.split('Bearer ')\n\n if (!validate(apiKeyValue)) {\n return null\n }\n\n return prisma.apiKey.findFirst({\n where: { type, value: apiKeyValue },\n })\n}\n","export const isJSON = (value: string) => {\n try {\n JSON.parse(value)\n return true\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) {\n return false\n }\n}\n","import type { Prisma, SseTransport, HttpTransport } from '@prisma/client'\n\nconst serializeApiSseTransport = ({\n sseTransport,\n}: {\n sseTransport: SseTransport\n}) => ({\n id: sseTransport.id,\n url: sseTransport.url,\n headers: sseTransport.headers,\n createdAt: sseTransport.createdAt.toISOString(),\n updatedAt: sseTransport.updatedAt.toISOString(),\n})\n\nconst serializeApiHttpTransport = ({\n httpTransport,\n}: {\n httpTransport: HttpTransport\n}) => ({\n id: httpTransport.id,\n url: httpTransport.url,\n headers: httpTransport.headers,\n createdAt: httpTransport.createdAt.toISOString(),\n updatedAt: httpTransport.updatedAt.toISOString(),\n})\n\nexport const serializeApiMcpServer = ({\n mcpServer,\n}: {\n mcpServer: Prisma.McpServerGetPayload<{\n include: {\n sseTransport: true\n httpTransport: true\n }\n }>\n}) => ({\n id: mcpServer.id,\n transportType: mcpServer.transportType,\n sseTransport: mcpServer.sseTransport\n ? serializeApiSseTransport({\n sseTransport: mcpServer.sseTransport,\n })\n : null,\n httpTransport: mcpServer.httpTransport\n ? serializeApiHttpTransport({\n httpTransport: mcpServer.httpTransport,\n })\n : null,\n createdAt: mcpServer.createdAt.toISOString(),\n updatedAt: mcpServer.updatedAt.toISOString(),\n})\n","import { z } from 'zod'\nimport { TransportType } from '@prisma/client'\nimport { isJSON } from '@/lib/misc/isJSON'\n\nconst stdioTransportSchema = z.object({\n command: z.string().min(1),\n args: z.string().min(1),\n})\n\nconst sseTransportSchema = z.object({\n url: z.string().min(1).url(),\n headers: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n})\n\nconst httpTransportSchema = z.object({\n url: z.string().min(1).url(),\n headers: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n})\n\nexport const baseSchema = z.object({\n transportType: z\n .nativeEnum(TransportType)\n .refine((t) => t !== TransportType.STDIO, {\n message: `transportType cannot be ${TransportType.STDIO}`,\n }),\n sseTransport: sseTransportSchema.nullable().optional(),\n httpTransport: httpTransportSchema.nullable().optional(),\n})\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const superRefine = (values: any, ctx: any) => {\n if (values.transportType === TransportType.STDIO) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `Transport type ${TransportType.STDIO} is not allowed.`,\n })\n\n const result = stdioTransportSchema.safeParse(values.stdioTransport)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['stdioTransport', ...issue.path],\n }),\n )\n } else if (values.transportType === TransportType.SSE) {\n const result = sseTransportSchema.safeParse(values.sseTransport)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['sseTransport', ...issue.path],\n }),\n )\n } else if (values.transportType === TransportType.HTTP) {\n const result = httpTransportSchema.safeParse(values.httpTransport)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['httpTransport', ...issue.path],\n }),\n )\n }\n}\n\nexport const mcpServerSchema = baseSchema.superRefine(superRefine)\n","import { type NextRequest, NextResponse } from 'next/server'\nimport { ApiKeyType, TransportType } from '@prisma/client'\nimport { headers } from 'next/headers'\nimport { cacheHeaders } from '@/lib/cache/cacheHeaders'\nimport { prisma } from '@/lib/prisma'\nimport { getApiKey } from '@/lib/apiKeys/getApiKey'\nimport { serializeApiMcpServer } from '@/lib/mcpServers/serializeApiMcpServer'\nimport { mcpServerSchema } from '@/lib/mcpServers/mcpServerSchema'\n\nexport const GET = async (\n _request: NextRequest,\n props: { params: Promise<{ assistantId: string }> },\n) => {\n const { assistantId } = await props.params\n\n const headersList = await headers()\n const authorization = headersList.get('authorization')\n if (!authorization) {\n return NextResponse.json(\n { error: 'No authorization header found' },\n { status: 400 },\n )\n }\n\n const privateApiKey = await getApiKey({\n type: ApiKeyType.PRIVATE,\n authorization,\n })\n\n if (!privateApiKey) {\n return NextResponse.json({ error: 'Invalid api key' }, { status: 400 })\n }\n\n const assistant = await prisma.assistant.findFirst({\n where: {\n id: assistantId,\n workspaceId: privateApiKey.workspaceId,\n },\n include: {\n mcpServers: {\n include: {\n stdioTransport: true,\n sseTransport: true,\n httpTransport: true,\n },\n orderBy: {\n createdAt: 'desc',\n },\n },\n },\n })\n\n if (!assistant) {\n return NextResponse.json({ error: 'No assistant found' }, { status: 400 })\n }\n\n return NextResponse.json(\n {\n mcpServers: assistant.mcpServers.map((mcpServer) =>\n serializeApiMcpServer({\n mcpServer,\n }),\n ),\n },\n { headers: cacheHeaders },\n )\n}\n\nexport const POST = async (\n request: NextRequest,\n props: { params: Promise<{ assistantId: string }> },\n) => {\n const { assistantId } = await props.params\n\n const headersList = await headers()\n const authorization = headersList.get('authorization')\n if (!authorization) {\n return NextResponse.json(\n { error: 'No authorization header found' },\n { status: 400 },\n )\n }\n\n const privateApiKey = await getApiKey({\n authorization,\n type: ApiKeyType.PRIVATE,\n })\n\n if (!privateApiKey) {\n return NextResponse.json({ error: 'Invalid api key' }, { status: 400 })\n }\n\n const body = await request.json()\n const parsed = mcpServerSchema.safeParse(body)\n\n if (!parsed.success) {\n return NextResponse.json({ error: 'Invalid payload' }, { status: 400 })\n }\n\n const { transportType, sseTransport, httpTransport } = parsed.data\n\n const workspaceId = privateApiKey.workspaceId\n\n const assistant = await prisma.assistant.findFirst({\n where: { id: assistantId, workspaceId },\n })\n\n if (!assistant) {\n return NextResponse.json({ error: 'No assistant found' }, { status: 400 })\n }\n\n const mcpServer = await prisma.mcpServer.create({\n data: {\n transportType,\n ...(transportType === TransportType.SSE\n ? {\n sseTransport: {\n create: {\n url: sseTransport!.url,\n headers: JSON.parse(sseTransport!.headers),\n },\n },\n }\n : {}),\n ...(transportType === TransportType.HTTP\n ? {\n httpTransport: {\n create: {\n url: httpTransport!.url,\n headers: JSON.parse(httpTransport!.headers),\n },\n },\n }\n : {}),\n assistant: {\n connect: {\n id: assistantId,\n workspaceId,\n },\n },\n },\n include: {\n stdioTransport: true,\n sseTransport: true,\n httpTransport: true,\n },\n })\n\n return NextResponse.json(\n {\n mcpServer: serializeApiMcpServer({ mcpServer }),\n },\n { headers: cacheHeaders },\n )\n}\n\nexport const OPTIONS = () =>\n NextResponse.json(\n {},\n {\n headers: cacheHeaders,\n },\n )\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/assistants/[assistantId]/mcp-servers/route\",\n pathname: \"/api/assistants/[assistantId]/mcp-servers\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/mcp-servers/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n var _nextConfig_experimental;\n let srcPage = \"/api/assistants/[assistantId]/mcp-servers/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isRevalidate = isIsr && !supportsDynamicResponse;\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n cacheComponents: Boolean(nextConfig.experimental.cacheComponents),\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: (_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.cacheLife,\n isRevalidate,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${req.url}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!getRequestMeta(req, 'minimalMode') && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isRevalidate,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!getRequestMeta(req, 'minimalMode')) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(getRequestMeta(req, 'minimalMode') && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${req.url}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isRevalidate,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"6jCAAO,IAAM,EAAe,CAC1B,8BAA+B,IAC/B,+BAAgC,kCAChC,+BAAgC,cAClC,mDCHA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEO,IAAM,EAAY,MAAO,eAC9B,CAAa,MACb,CAAI,CAIL,IACC,GAAI,CAAC,EACH,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K,gBAAkB,GACxC,EAD6C,AACrC,GADwC,GAClC,CAAC,EAAA,sBAAsB,GAIrC,EAAW,YAAY,EAAK,EAAD,AAAK,SAAS,CAAC,kBAAqB,EAAD,AAAS,GAAG,CAAC,kBAAkB,AAC7F,EAAQ,GAAG,CAAC,gBAAiB,CAAA,EAAA,EAAA,qBAAA,AAAqB,EAAC,EAAW,YAAY,GAE9E,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAC7E,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAI,GAAG,CAAA,CAAE,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAcV,GAbM,AAAF,CAAC,YAAgB,EAAA,eAAe,EAChC,CADmC,KAC7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,cAClC,uBACA,CACJ,EACJ,GAIA,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[6]}
|
|
1
|
+
{"version":3,"sources":["turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/cache/cacheHeaders.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/apiKeys/getApiKey.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/misc/isJSON.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/mcpServers/serializeApiMcpServer.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/mcpServers/mcpServerSchema.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/mcp-servers/route.ts","turbopack:///[project]/supercorp/superinterface/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["export const cacheHeaders = {\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',\n 'Access-Control-Allow-Headers': 'Content-Type',\n}\n","import { ApiKeyType, ApiKey } from '@prisma/client'\nimport { validate } from 'uuid'\nimport { prisma } from '@/lib/prisma'\n\nexport const getApiKey = async ({\n authorization,\n type,\n}: {\n authorization: string | null\n type: ApiKeyType\n}): Promise<ApiKey | null> => {\n if (!authorization) {\n return null\n }\n\n const [, apiKeyValue] = authorization.split('Bearer ')\n\n if (!validate(apiKeyValue)) {\n return null\n }\n\n return prisma.apiKey.findFirst({\n where: { type, value: apiKeyValue },\n })\n}\n","export const isJSON = (value: string) => {\n try {\n JSON.parse(value)\n return true\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) {\n return false\n }\n}\n","import type { Prisma, SseTransport, HttpTransport } from '@prisma/client'\n\nconst serializeApiSseTransport = ({\n sseTransport,\n}: {\n sseTransport: SseTransport\n}) => ({\n id: sseTransport.id,\n url: sseTransport.url,\n headers: sseTransport.headers,\n createdAt: sseTransport.createdAt.toISOString(),\n updatedAt: sseTransport.updatedAt.toISOString(),\n})\n\nconst serializeApiHttpTransport = ({\n httpTransport,\n}: {\n httpTransport: HttpTransport\n}) => ({\n id: httpTransport.id,\n url: httpTransport.url,\n headers: httpTransport.headers,\n createdAt: httpTransport.createdAt.toISOString(),\n updatedAt: httpTransport.updatedAt.toISOString(),\n})\n\nexport const serializeApiMcpServer = ({\n mcpServer,\n}: {\n mcpServer: Prisma.McpServerGetPayload<{\n include: {\n sseTransport: true\n httpTransport: true\n }\n }>\n}) => ({\n id: mcpServer.id,\n transportType: mcpServer.transportType,\n sseTransport: mcpServer.sseTransport\n ? serializeApiSseTransport({\n sseTransport: mcpServer.sseTransport,\n })\n : null,\n httpTransport: mcpServer.httpTransport\n ? serializeApiHttpTransport({\n httpTransport: mcpServer.httpTransport,\n })\n : null,\n createdAt: mcpServer.createdAt.toISOString(),\n updatedAt: mcpServer.updatedAt.toISOString(),\n})\n","import { z } from 'zod'\nimport { TransportType } from '@prisma/client'\nimport { isJSON } from '@/lib/misc/isJSON'\n\nconst stdioTransportSchema = z.object({\n command: z.string().min(1),\n args: z.string().min(1),\n})\n\nconst sseTransportSchema = z.object({\n url: z.string().min(1).url(),\n headers: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n})\n\nconst httpTransportSchema = z.object({\n url: z.string().min(1).url(),\n headers: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n})\n\nexport const baseSchema = z.object({\n transportType: z\n .nativeEnum(TransportType)\n .refine((t) => t !== TransportType.STDIO, {\n message: `transportType cannot be ${TransportType.STDIO}`,\n }),\n sseTransport: sseTransportSchema.nullable().optional(),\n httpTransport: httpTransportSchema.nullable().optional(),\n})\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const superRefine = (values: any, ctx: any) => {\n if (values.transportType === TransportType.STDIO) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `Transport type ${TransportType.STDIO} is not allowed.`,\n })\n\n const result = stdioTransportSchema.safeParse(values.stdioTransport)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['stdioTransport', ...issue.path],\n }),\n )\n } else if (values.transportType === TransportType.SSE) {\n const result = sseTransportSchema.safeParse(values.sseTransport)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['sseTransport', ...issue.path],\n }),\n )\n } else if (values.transportType === TransportType.HTTP) {\n const result = httpTransportSchema.safeParse(values.httpTransport)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['httpTransport', ...issue.path],\n }),\n )\n }\n}\n\nexport const mcpServerSchema = baseSchema.superRefine(superRefine)\n","import { type NextRequest, NextResponse } from 'next/server'\nimport { ApiKeyType, TransportType } from '@prisma/client'\nimport { headers } from 'next/headers'\nimport { cacheHeaders } from '@/lib/cache/cacheHeaders'\nimport { prisma } from '@/lib/prisma'\nimport { getApiKey } from '@/lib/apiKeys/getApiKey'\nimport { serializeApiMcpServer } from '@/lib/mcpServers/serializeApiMcpServer'\nimport { mcpServerSchema } from '@/lib/mcpServers/mcpServerSchema'\n\nexport const GET = async (\n _request: NextRequest,\n props: { params: Promise<{ assistantId: string }> },\n) => {\n const { assistantId } = await props.params\n\n const headersList = await headers()\n const authorization = headersList.get('authorization')\n if (!authorization) {\n return NextResponse.json(\n { error: 'No authorization header found' },\n { status: 400 },\n )\n }\n\n const privateApiKey = await getApiKey({\n type: ApiKeyType.PRIVATE,\n authorization,\n })\n\n if (!privateApiKey) {\n return NextResponse.json({ error: 'Invalid api key' }, { status: 400 })\n }\n\n const assistant = await prisma.assistant.findFirst({\n where: {\n id: assistantId,\n workspaceId: privateApiKey.workspaceId,\n },\n include: {\n mcpServers: {\n include: {\n stdioTransport: true,\n sseTransport: true,\n httpTransport: true,\n },\n orderBy: {\n createdAt: 'desc',\n },\n },\n },\n })\n\n if (!assistant) {\n return NextResponse.json({ error: 'No assistant found' }, { status: 400 })\n }\n\n return NextResponse.json(\n {\n mcpServers: assistant.mcpServers.map((mcpServer) =>\n serializeApiMcpServer({\n mcpServer,\n }),\n ),\n },\n { headers: cacheHeaders },\n )\n}\n\nexport const POST = async (\n request: NextRequest,\n props: { params: Promise<{ assistantId: string }> },\n) => {\n const { assistantId } = await props.params\n\n const headersList = await headers()\n const authorization = headersList.get('authorization')\n if (!authorization) {\n return NextResponse.json(\n { error: 'No authorization header found' },\n { status: 400 },\n )\n }\n\n const privateApiKey = await getApiKey({\n authorization,\n type: ApiKeyType.PRIVATE,\n })\n\n if (!privateApiKey) {\n return NextResponse.json({ error: 'Invalid api key' }, { status: 400 })\n }\n\n const body = await request.json()\n const parsed = mcpServerSchema.safeParse(body)\n\n if (!parsed.success) {\n return NextResponse.json({ error: 'Invalid payload' }, { status: 400 })\n }\n\n const { transportType, sseTransport, httpTransport } = parsed.data\n\n const workspaceId = privateApiKey.workspaceId\n\n const assistant = await prisma.assistant.findFirst({\n where: { id: assistantId, workspaceId },\n })\n\n if (!assistant) {\n return NextResponse.json({ error: 'No assistant found' }, { status: 400 })\n }\n\n const mcpServer = await prisma.mcpServer.create({\n data: {\n transportType,\n ...(transportType === TransportType.SSE\n ? {\n sseTransport: {\n create: {\n url: sseTransport!.url,\n headers: JSON.parse(sseTransport!.headers),\n },\n },\n }\n : {}),\n ...(transportType === TransportType.HTTP\n ? {\n httpTransport: {\n create: {\n url: httpTransport!.url,\n headers: JSON.parse(httpTransport!.headers),\n },\n },\n }\n : {}),\n assistant: {\n connect: {\n id: assistantId,\n workspaceId,\n },\n },\n },\n include: {\n stdioTransport: true,\n sseTransport: true,\n httpTransport: true,\n },\n })\n\n return NextResponse.json(\n {\n mcpServer: serializeApiMcpServer({ mcpServer }),\n },\n { headers: cacheHeaders },\n )\n}\n\nexport const OPTIONS = () =>\n NextResponse.json(\n {},\n {\n headers: cacheHeaders,\n },\n )\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/assistants/[assistantId]/mcp-servers/route\",\n pathname: \"/api/assistants/[assistantId]/mcp-servers\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/mcp-servers/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n var _nextConfig_experimental;\n let srcPage = \"/api/assistants/[assistantId]/mcp-servers/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isRevalidate = isIsr && !supportsDynamicResponse;\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n cacheComponents: Boolean(nextConfig.experimental.cacheComponents),\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: (_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.cacheLife,\n isRevalidate,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${req.url}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!getRequestMeta(req, 'minimalMode') && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isRevalidate,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!getRequestMeta(req, 'minimalMode')) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(getRequestMeta(req, 'minimalMode') && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${req.url}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isRevalidate,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"6jCAAO,IAAM,EAAe,CAC1B,8BAA+B,IAC/B,+BAAgC,kCAChC,+BAAgC,cAClC,mDCHA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEO,IAAM,EAAY,MAAO,eAC9B,CAAa,CACb,MAAI,CAIL,IACC,GAAI,CAAC,EACH,OAAO,KAGT,CAJoB,EAId,EAAG,EAAY,CAAG,EAAc,KAAK,CAAC,iBAE5C,AAAK,CAAA,EAAA,CAAD,CAAC,QAAA,AAAQ,EAAC,GAIP,EAAA,MAAM,CAAC,EAJc,IAIR,CAAC,SAAS,CAAC,CAC7B,MAAO,MAAE,EAAM,MAAO,CAAY,CACpC,GALS,IAMX,gDCxBO,IAAM,EAAS,AAAC,IACrB,GAAI,CAEF,OADA,KAAK,KAAK,CAAC,IACJ,CAET,CAAE,MAAO,EAAG,CACV,OAAO,CACT,CACF,0ECkBO,IAAM,EAAwB,CAAC,WACpC,CAAS,CAQV,GAAK,CAAC,CACL,GAAI,EAAU,EAAE,CAChB,cAAe,EAAU,aAAa,CACtC,aAAc,EAAU,YAAY,CAChC,CArC2B,CAAC,cAChC,CAAY,CAGb,GAAK,CAAC,CACL,GAAI,EAAa,EAAE,CACnB,IAAK,EAAa,GAAG,CACrB,QAAS,EAAa,OAAO,CAC7B,UAAW,EAAa,SAAS,CAAC,WAAW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,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAcV,GAbM,AAAF,CAAC,YAAgB,EAAA,eAAe,EAChC,CADmC,KAC7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,cAClC,uBACA,CACJ,EACJ,GAIA,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[6]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},36929,
|
|
1
|
+
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},36929,a=>{"use strict";a.s([])},63668,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"default",{enumerable:!0,get:function(){return f}});let d=a.r(32623),e=a.r(8404);function f(){return(0,d.jsx)(e.HTTPAccessErrorFallback,{status:401,message:"You're not authorized to access this page."})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__09232d18._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["turbopack:///[project]/supercorp/superinterface/node_modules/next/src/client/components/builtin/unauthorized.tsx"],"sourcesContent":["import { HTTPAccessErrorFallback } from '../http-access-fallback/error-fallback'\n\nexport default function Unauthorized() {\n return (\n <HTTPAccessErrorFallback\n status={401}\n message=\"You're not authorized to access this page.\"\n />\n )\n}\n"],"names":["Unauthorized","HTTPAccessErrorFallback","status","message"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["turbopack:///[project]/supercorp/superinterface/node_modules/next/src/client/components/builtin/unauthorized.tsx"],"sourcesContent":["import { HTTPAccessErrorFallback } from '../http-access-fallback/error-fallback'\n\nexport default function Unauthorized() {\n return (\n <HTTPAccessErrorFallback\n status={401}\n message=\"You're not authorized to access this page.\"\n />\n )\n}\n"],"names":["Unauthorized","HTTPAccessErrorFallback","status","message"],"mappings":"6SAEA,UAAA,qCAAwBA,0BAFgB,CAAA,CAAA,IAAA,EAEzB,SAASA,IACtB,MACE,CADF,AACE,EAAA,EAAA,GAAA,EAACC,EADH,AACGA,uBAAuB,CAAA,CACtBC,OAAQ,IACRC,QAAQ,8CAGd","ignoreList":[0]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},25456,
|
|
1
|
+
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},25456,a=>{"use strict";a.s([])},55789,a=>{"use strict";a.s(["default",()=>c]);var b=a.i(32623);function c(){return(0,b.jsx)("div",{children:"@superinterface/server is running."})}}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__55cc8360._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["turbopack:///[project]/supercorp/superinterface/packages/server/src/app/page.tsx"],"sourcesContent":["export default function Page() {\n return <div>@superinterface/server is running.</div>\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["turbopack:///[project]/supercorp/superinterface/packages/server/src/app/page.tsx"],"sourcesContent":["export default function Page() {\n return <div>@superinterface/server is running.</div>\n}\n"],"names":[],"mappings":"sQAAe,SAAS,IACtB,MAAO,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,UAAI,sCACd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--ro8zTpWa9gNP9pVyKlucL--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/76a8a50dbf44f000.js"/><script src="/_next/static/chunks/079ce3572ffa07f6.js" async=""></script><script src="/_next/static/chunks/4649e58e35bcde4b.js" async=""></script><script src="/_next/static/chunks/turbopack-11882cf18a9eb231.js" async=""></script><script src="/_next/static/chunks/03d938d038bc30e3.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/76a8a50dbf44f000.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[96352,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n3:I[17753,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n4:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"OutletBoundary\"]\n6:I[33159,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"AsyncMetadataOutlet\"]\n8:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"ViewportBoundary\"]\na:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd:I[25098,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"ro8zTpWa9gNP9pVyKlucL\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/03d938d038bc30e3.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],null],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"7:{\"metadata\":[],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/a6dad97d9634a72d.js"></script><script src="/_next/static/chunks/22bca0be24d1dbb3.js" defer=""></script><script src="/_next/static/chunks/bd1a5816a611d718.js" defer=""></script><script src="/_next/static/chunks/turbopack-3bdbb570d8566903.js" defer=""></script><script src="/_next/static/chunks/e57ec661e9850a31.js" defer=""></script><script src="/_next/static/chunks/turbopack-67ff8c1c5b1ad9a8.js" defer=""></script><script src="/_next/static/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/a6dad97d9634a72d.js"></script><script src="/_next/static/chunks/22bca0be24d1dbb3.js" defer=""></script><script src="/_next/static/chunks/bd1a5816a611d718.js" defer=""></script><script src="/_next/static/chunks/turbopack-3bdbb570d8566903.js" defer=""></script><script src="/_next/static/chunks/e57ec661e9850a31.js" defer=""></script><script src="/_next/static/chunks/turbopack-67ff8c1c5b1ad9a8.js" defer=""></script><script src="/_next/static/ro8zTpWa9gNP9pVyKlucL/_ssgManifest.js" defer=""></script><script src="/_next/static/ro8zTpWa9gNP9pVyKlucL/_buildManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"ro8zTpWa9gNP9pVyKlucL","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
package/.next/trace
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"generate-buildid","duration":147,"timestamp":4796047400,"id":4,"parentId":1,"tags":{},"startTime":1759896308361,"traceId":"a26e44ee902bd4fd"},{"name":"load-custom-routes","duration":182,"timestamp":4796047598,"id":5,"parentId":1,"tags":{},"startTime":1759896308361,"traceId":"a26e44ee902bd4fd"},{"name":"create-dist-dir","duration":1974,"timestamp":4796092215,"id":6,"parentId":1,"tags":{},"startTime":1759896308406,"traceId":"a26e44ee902bd4fd"},{"name":"create-pages-mapping","duration":2441,"timestamp":4796135572,"id":7,"parentId":1,"tags":{},"startTime":1759896308449,"traceId":"a26e44ee902bd4fd"},{"name":"collect-app-files","duration":4975,"timestamp":4796138046,"id":8,"parentId":1,"tags":{},"startTime":1759896308451,"traceId":"a26e44ee902bd4fd"},{"name":"create-app-mapping","duration":927,"timestamp":4796143043,"id":9,"parentId":1,"tags":{},"startTime":1759896308456,"traceId":"a26e44ee902bd4fd"},{"name":"create-app-layouts","duration":186,"timestamp":4796143984,"id":10,"parentId":1,"tags":{},"startTime":1759896308457,"traceId":"a26e44ee902bd4fd"},{"name":"collect-default-files","duration":859,"timestamp":4796147325,"id":12,"parentId":1,"tags":{},"startTime":1759896308461,"traceId":"a26e44ee902bd4fd"},{"name":"generate-route-types","duration":27097,"timestamp":4796144465,"id":11,"parentId":1,"tags":{},"startTime":1759896308458,"traceId":"a26e44ee902bd4fd"},{"name":"public-dir-conflict-check","duration":685,"timestamp":4796171685,"id":13,"parentId":1,"tags":{},"startTime":1759896308485,"traceId":"a26e44ee902bd4fd"},{"name":"generate-routes-manifest","duration":2103,"timestamp":4796172490,"id":14,"parentId":1,"tags":{},"startTime":1759896308486,"traceId":"a26e44ee902bd4fd"},{"name":"run-turbopack-compiler","duration":7969853,"timestamp":4796192295,"id":16,"parentId":1,"tags":{},"startTime":1759896308506,"traceId":"a26e44ee902bd4fd"},{"name":"verify-and-lint","duration":1655817,"timestamp":4804183992,"id":19,"parentId":1,"tags":{},"startTime":1759896316497,"traceId":"a26e44ee902bd4fd"},{"name":"verify-typescript-setup","duration":4978483,"timestamp":4804180022,"id":18,"parentId":1,"tags":{},"startTime":1759896316493,"traceId":"a26e44ee902bd4fd"},{"name":"check-static-error-page","duration":2835,"timestamp":4809168813,"id":22,"parentId":21,"tags":{},"startTime":1759896321482,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":2040,"timestamp":4809256699,"id":23,"parentId":21,"tags":{"page":"/_app"},"startTime":1759896321570,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":1470,"timestamp":4809257278,"id":25,"parentId":21,"tags":{"page":"/_document"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":1530,"timestamp":4809257220,"id":24,"parentId":21,"tags":{"page":"/_error"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":317446,"timestamp":4809264309,"id":52,"parentId":28,"tags":{},"startTime":1759896321578,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":324432,"timestamp":4809257369,"id":28,"parentId":21,"tags":{"page":"/api/api-keys"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":333981,"timestamp":4809260478,"id":50,"parentId":46,"tags":{},"startTime":1759896321574,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":336940,"timestamp":4809257547,"id":46,"parentId":21,"tags":{"page":"/api/threads/runs/submit-client-tool-outputs"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":338555,"timestamp":4809265600,"id":55,"parentId":35,"tags":{},"startTime":1759896321579,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":346696,"timestamp":4809257488,"id":35,"parentId":21,"tags":{"page":"/api/assistants"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":339506,"timestamp":4809264749,"id":53,"parentId":27,"tags":{},"startTime":1759896321578,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":346912,"timestamp":4809257354,"id":27,"parentId":21,"tags":{"page":"/api/api-keys/[apiKeyId]"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":340388,"timestamp":4809263904,"id":51,"parentId":31,"tags":{},"startTime":1759896321577,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":346850,"timestamp":4809257449,"id":31,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/initial-messages"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":339074,"timestamp":4809265245,"id":54,"parentId":29,"tags":{},"startTime":1759896321579,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":346949,"timestamp":4809257377,"id":29,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/functions/[functionId]"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":343305,"timestamp":4809267609,"id":62,"parentId":42,"tags":{},"startTime":1759896321581,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":353412,"timestamp":4809257524,"id":42,"parentId":21,"tags":{"page":"/api/providers"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":349968,"timestamp":4809267995,"id":63,"parentId":41,"tags":{},"startTime":1759896321581,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":360468,"timestamp":4809257519,"id":41,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":360235,"timestamp":4809266767,"id":58,"parentId":34,"tags":{},"startTime":1759896321580,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":369549,"timestamp":4809257481,"id":34,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":380921,"timestamp":4809268230,"id":64,"parentId":45,"tags":{},"startTime":1759896321582,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":391637,"timestamp":4809257539,"id":45,"parentId":21,"tags":{"page":"/api/tasks"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":389989,"timestamp":4809268722,"id":65,"parentId":43,"tags":{},"startTime":1759896321582,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":401250,"timestamp":4809257529,"id":43,"parentId":21,"tags":{"page":"/api/tasks/[taskId]"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":402708,"timestamp":4809267118,"id":59,"parentId":33,"tags":{},"startTime":1759896321580,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":412415,"timestamp":4809257474,"id":33,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/mcp-servers"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":421435,"timestamp":4809268987,"id":66,"parentId":47,"tags":{},"startTime":1759896321582,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":432897,"timestamp":4809257553,"id":47,"parentId":21,"tags":{"page":"/api/workspaces/[workspaceId]"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":440149,"timestamp":4809270786,"id":69,"parentId":26,"tags":{},"startTime":1759896321584,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":453667,"timestamp":4809257293,"id":26,"parentId":21,"tags":{"page":"/_not-found"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":449757,"timestamp":4809271026,"id":70,"parentId":48,"tags":{},"startTime":1759896321584,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":463250,"timestamp":4809257558,"id":48,"parentId":21,"tags":{"page":"/api/workspaces"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":459939,"timestamp":4809271285,"id":71,"parentId":30,"tags":{},"startTime":1759896321585,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":473913,"timestamp":4809257384,"id":30,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/functions"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":463573,"timestamp":4809271685,"id":72,"parentId":32,"tags":{},"startTime":1759896321585,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":477826,"timestamp":4809257462,"id":32,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/mcp-servers/[mcpServerId]"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":466219,"timestamp":4809274525,"id":73,"parentId":49,"tags":{},"startTime":1759896321588,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":483205,"timestamp":4809257565,"id":49,"parentId":21,"tags":{"page":"/"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":561407,"timestamp":4809267402,"id":61,"parentId":39,"tags":{},"startTime":1759896321581,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":571352,"timestamp":4809257509,"id":39,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]/assistants"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":584621,"timestamp":4809267263,"id":60,"parentId":40,"tags":{},"startTime":1759896321581,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":594433,"timestamp":4809257514,"id":40,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]/models"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":600221,"timestamp":4809266151,"id":57,"parentId":37,"tags":{},"startTime":1759896321580,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":608906,"timestamp":4809257498,"id":37,"parentId":21,"tags":{"page":"/api/files"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":603429,"timestamp":4809265864,"id":56,"parentId":36,"tags":{},"startTime":1759896321579,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":611819,"timestamp":4809257493,"id":36,"parentId":21,"tags":{"page":"/api/files/[fileId]/contents"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":652753,"timestamp":4809270723,"id":68,"parentId":44,"tags":{},"startTime":1759896321584,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":665999,"timestamp":4809257534,"id":44,"parentId":21,"tags":{"page":"/api/tasks/callback"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"is-page-static","duration":661009,"timestamp":4809270283,"id":67,"parentId":38,"tags":{},"startTime":1759896321584,"traceId":"a26e44ee902bd4fd"},{"name":"check-page","duration":673835,"timestamp":4809257504,"id":38,"parentId":21,"tags":{"page":"/api/messages"},"startTime":1759896321571,"traceId":"a26e44ee902bd4fd"},{"name":"static-check","duration":763165,"timestamp":4809168208,"id":21,"parentId":1,"tags":{},"startTime":1759896321482,"traceId":"a26e44ee902bd4fd"},{"name":"generate-required-server-files","duration":225,"timestamp":4809931714,"id":75,"parentId":1,"tags":{},"startTime":1759896322245,"traceId":"a26e44ee902bd4fd"},{"name":"write-routes-manifest","duration":647,"timestamp":4809938014,"id":77,"parentId":1,"tags":{},"startTime":1759896322251,"traceId":"a26e44ee902bd4fd"},{"name":"load-dotenv","duration":15,"timestamp":4809953625,"id":80,"parentId":79,"tags":{},"startTime":1759896322267,"traceId":"a26e44ee902bd4fd"},{"name":"run-export-path-map","duration":336,"timestamp":4810063960,"id":81,"parentId":79,"tags":{},"startTime":1759896322377,"traceId":"a26e44ee902bd4fd"},{"name":"next-export","duration":1060333,"timestamp":4809953069,"id":79,"parentId":1,"tags":{},"startTime":1759896322266,"traceId":"a26e44ee902bd4fd"},{"name":"move-exported-app-not-found-","duration":3365,"timestamp":4811014512,"id":82,"parentId":78,"tags":{},"startTime":1759896323328,"traceId":"a26e44ee902bd4fd"},{"name":"move-exported-page","duration":37127,"timestamp":4811017978,"id":83,"parentId":78,"tags":{},"startTime":1759896323331,"traceId":"a26e44ee902bd4fd"},{"name":"static-generation","duration":1458432,"timestamp":4809947824,"id":78,"parentId":1,"tags":{},"startTime":1759896322261,"traceId":"a26e44ee902bd4fd"},{"name":"write-routes-manifest","duration":55991,"timestamp":4811406492,"id":84,"parentId":1,"tags":{},"startTime":1759896323720,"traceId":"a26e44ee902bd4fd"},{"name":"node-file-trace-build","duration":3914674,"timestamp":4809933767,"id":76,"parentId":1,"tags":{"isTurbotrace":"false"},"startTime":1759896322247,"traceId":"a26e44ee902bd4fd"},{"name":"apply-include-excludes","duration":309,"timestamp":4813848457,"id":85,"parentId":1,"tags":{},"startTime":1759896326162,"traceId":"a26e44ee902bd4fd"},{"name":"print-tree-view","duration":2078,"timestamp":4813849031,"id":86,"parentId":1,"tags":{},"startTime":1759896326162,"traceId":"a26e44ee902bd4fd"},{"name":"telemetry-flush","duration":23,"timestamp":4813851116,"id":87,"parentId":1,"tags":{},"startTime":1759896326165,"traceId":"a26e44ee902bd4fd"},{"name":"next-build","duration":18206239,"timestamp":4795644903,"id":1,"tags":{"buildMode":"default","isTurboBuild":"true","version":"15.5.4","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1759896307958,"traceId":"a26e44ee902bd4fd"}]
|
|
1
|
+
[{"name":"generate-buildid","duration":116,"timestamp":6386248660,"id":4,"parentId":1,"tags":{},"startTime":1759897898566,"traceId":"e89bafd0800fa0ea"},{"name":"load-custom-routes","duration":166,"timestamp":6386248823,"id":5,"parentId":1,"tags":{},"startTime":1759897898566,"traceId":"e89bafd0800fa0ea"},{"name":"create-dist-dir","duration":1759,"timestamp":6386282771,"id":6,"parentId":1,"tags":{},"startTime":1759897898600,"traceId":"e89bafd0800fa0ea"},{"name":"create-pages-mapping","duration":183,"timestamp":6386358802,"id":7,"parentId":1,"tags":{},"startTime":1759897898676,"traceId":"e89bafd0800fa0ea"},{"name":"collect-app-files","duration":3467,"timestamp":6386359015,"id":8,"parentId":1,"tags":{},"startTime":1759897898676,"traceId":"e89bafd0800fa0ea"},{"name":"create-app-mapping","duration":2289,"timestamp":6386362522,"id":9,"parentId":1,"tags":{},"startTime":1759897898680,"traceId":"e89bafd0800fa0ea"},{"name":"create-app-layouts","duration":233,"timestamp":6386364834,"id":10,"parentId":1,"tags":{},"startTime":1759897898682,"traceId":"e89bafd0800fa0ea"},{"name":"collect-default-files","duration":2181,"timestamp":6386365946,"id":12,"parentId":1,"tags":{},"startTime":1759897898683,"traceId":"e89bafd0800fa0ea"},{"name":"generate-route-types","duration":14781,"timestamp":6386365398,"id":11,"parentId":1,"tags":{},"startTime":1759897898683,"traceId":"e89bafd0800fa0ea"},{"name":"public-dir-conflict-check","duration":808,"timestamp":6386380330,"id":13,"parentId":1,"tags":{},"startTime":1759897898698,"traceId":"e89bafd0800fa0ea"},{"name":"generate-routes-manifest","duration":2282,"timestamp":6386381380,"id":14,"parentId":1,"tags":{},"startTime":1759897898699,"traceId":"e89bafd0800fa0ea"},{"name":"run-turbopack-compiler","duration":6696918,"timestamp":6386389103,"id":16,"parentId":1,"tags":{},"startTime":1759897898706,"traceId":"e89bafd0800fa0ea"},{"name":"verify-and-lint","duration":2890711,"timestamp":6393146626,"id":19,"parentId":1,"tags":{},"startTime":1759897905464,"traceId":"e89bafd0800fa0ea"},{"name":"verify-typescript-setup","duration":5164961,"timestamp":6393142288,"id":18,"parentId":1,"tags":{},"startTime":1759897905460,"traceId":"e89bafd0800fa0ea"},{"name":"check-static-error-page","duration":2290,"timestamp":6398315805,"id":22,"parentId":21,"tags":{},"startTime":1759897910633,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":2173,"timestamp":6398378186,"id":23,"parentId":21,"tags":{"page":"/_app"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":1656,"timestamp":6398378713,"id":25,"parentId":21,"tags":{"page":"/_document"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":1713,"timestamp":6398378657,"id":24,"parentId":21,"tags":{"page":"/_error"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":270471,"timestamp":6398394879,"id":54,"parentId":26,"tags":{},"startTime":1759897910712,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":286662,"timestamp":6398378728,"id":26,"parentId":21,"tags":{"page":"/_not-found"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":315285,"timestamp":6398388720,"id":50,"parentId":46,"tags":{},"startTime":1759897910706,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":325061,"timestamp":6398378985,"id":46,"parentId":21,"tags":{"page":"/api/threads/runs/submit-client-tool-outputs"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":329060,"timestamp":6398396218,"id":57,"parentId":35,"tags":{},"startTime":1759897910714,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":346375,"timestamp":6398378932,"id":35,"parentId":21,"tags":{"page":"/api/assistants"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":359128,"timestamp":6398393101,"id":51,"parentId":31,"tags":{},"startTime":1759897910711,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":373467,"timestamp":6398378829,"id":31,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/initial-messages"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":357616,"timestamp":6398394762,"id":53,"parentId":30,"tags":{},"startTime":1759897910712,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":373579,"timestamp":6398378816,"id":30,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/functions"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":358089,"timestamp":6398394374,"id":52,"parentId":27,"tags":{},"startTime":1759897910712,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":373692,"timestamp":6398378786,"id":27,"parentId":21,"tags":{"page":"/api/api-keys/[apiKeyId]"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":368789,"timestamp":6398395317,"id":55,"parentId":32,"tags":{},"startTime":1759897910713,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":385231,"timestamp":6398378903,"id":32,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/mcp-servers/[mcpServerId]"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":368349,"timestamp":6398395829,"id":56,"parentId":34,"tags":{},"startTime":1759897910713,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":385259,"timestamp":6398378925,"id":34,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":370074,"timestamp":6398397473,"id":62,"parentId":42,"tags":{},"startTime":1759897910715,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":388610,"timestamp":6398378965,"id":42,"parentId":21,"tags":{"page":"/api/providers"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":379843,"timestamp":6398396831,"id":59,"parentId":33,"tags":{},"startTime":1759897910714,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":397786,"timestamp":6398378918,"id":33,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/mcp-servers"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":385995,"timestamp":6398399654,"id":66,"parentId":28,"tags":{},"startTime":1759897910717,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":406903,"timestamp":6398378801,"id":28,"parentId":21,"tags":{"page":"/api/api-keys"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":411763,"timestamp":6398399906,"id":67,"parentId":47,"tags":{},"startTime":1759897910717,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":432706,"timestamp":6398378990,"id":47,"parentId":21,"tags":{"page":"/api/workspaces/[workspaceId]"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":419293,"timestamp":6398399367,"id":65,"parentId":43,"tags":{},"startTime":1759897910717,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":439739,"timestamp":6398378970,"id":43,"parentId":21,"tags":{"page":"/api/tasks/[taskId]"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":460800,"timestamp":6398400629,"id":69,"parentId":48,"tags":{},"startTime":1759897910718,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":488664,"timestamp":6398378994,"id":48,"parentId":21,"tags":{"page":"/api/workspaces"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":482254,"timestamp":6398400849,"id":70,"parentId":45,"tags":{},"startTime":1759897910718,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":504174,"timestamp":6398378981,"id":45,"parentId":21,"tags":{"page":"/api/tasks"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":495267,"timestamp":6398401239,"id":71,"parentId":29,"tags":{},"startTime":1759897910719,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":517774,"timestamp":6398378809,"id":29,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/functions/[functionId]"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":498169,"timestamp":6398401639,"id":72,"parentId":41,"tags":{},"startTime":1759897910719,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":521093,"timestamp":6398378961,"id":41,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":503108,"timestamp":6398421562,"id":73,"parentId":49,"tags":{},"startTime":1759897910739,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":545792,"timestamp":6398378999,"id":49,"parentId":21,"tags":{"page":"/"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":548638,"timestamp":6398397255,"id":61,"parentId":40,"tags":{},"startTime":1759897910715,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":566991,"timestamp":6398378956,"id":40,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]/models"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":569177,"timestamp":6398397119,"id":60,"parentId":36,"tags":{},"startTime":1759897910715,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":587391,"timestamp":6398378937,"id":36,"parentId":21,"tags":{"page":"/api/files/[fileId]/contents"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":585277,"timestamp":6398396442,"id":58,"parentId":37,"tags":{},"startTime":1759897910714,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":602839,"timestamp":6398378942,"id":37,"parentId":21,"tags":{"page":"/api/files"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":603576,"timestamp":6398398859,"id":64,"parentId":39,"tags":{},"startTime":1759897910716,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":623518,"timestamp":6398378951,"id":39,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]/assistants"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":629498,"timestamp":6398398721,"id":63,"parentId":38,"tags":{},"startTime":1759897910716,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":649311,"timestamp":6398378946,"id":38,"parentId":21,"tags":{"page":"/api/messages"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"is-page-static","duration":636330,"timestamp":6398400401,"id":68,"parentId":44,"tags":{},"startTime":1759897910718,"traceId":"e89bafd0800fa0ea"},{"name":"check-page","duration":657772,"timestamp":6398378975,"id":44,"parentId":21,"tags":{"page":"/api/tasks/callback"},"startTime":1759897910696,"traceId":"e89bafd0800fa0ea"},{"name":"static-check","duration":721435,"timestamp":6398315372,"id":21,"parentId":1,"tags":{},"startTime":1759897910633,"traceId":"e89bafd0800fa0ea"},{"name":"generate-required-server-files","duration":244,"timestamp":6399037323,"id":75,"parentId":1,"tags":{},"startTime":1759897911355,"traceId":"e89bafd0800fa0ea"},{"name":"write-routes-manifest","duration":530,"timestamp":6399042535,"id":77,"parentId":1,"tags":{},"startTime":1759897911360,"traceId":"e89bafd0800fa0ea"},{"name":"load-dotenv","duration":14,"timestamp":6399055690,"id":80,"parentId":79,"tags":{},"startTime":1759897911373,"traceId":"e89bafd0800fa0ea"},{"name":"run-export-path-map","duration":291,"timestamp":6399156768,"id":81,"parentId":79,"tags":{},"startTime":1759897911474,"traceId":"e89bafd0800fa0ea"},{"name":"next-export","duration":1114515,"timestamp":6399055140,"id":79,"parentId":1,"tags":{},"startTime":1759897911373,"traceId":"e89bafd0800fa0ea"},{"name":"move-exported-app-not-found-","duration":12488,"timestamp":6400170784,"id":82,"parentId":78,"tags":{},"startTime":1759897912488,"traceId":"e89bafd0800fa0ea"},{"name":"move-exported-page","duration":108948,"timestamp":6400183399,"id":83,"parentId":78,"tags":{},"startTime":1759897912501,"traceId":"e89bafd0800fa0ea"},{"name":"static-generation","duration":1551566,"timestamp":6399051487,"id":78,"parentId":1,"tags":{},"startTime":1759897911369,"traceId":"e89bafd0800fa0ea"},{"name":"write-routes-manifest","duration":22621,"timestamp":6400603262,"id":84,"parentId":1,"tags":{},"startTime":1759897912921,"traceId":"e89bafd0800fa0ea"},{"name":"node-file-trace-build","duration":3864968,"timestamp":6399038946,"id":76,"parentId":1,"tags":{"isTurbotrace":"false"},"startTime":1759897911356,"traceId":"e89bafd0800fa0ea"},{"name":"apply-include-excludes","duration":293,"timestamp":6402903931,"id":85,"parentId":1,"tags":{},"startTime":1759897915221,"traceId":"e89bafd0800fa0ea"},{"name":"print-tree-view","duration":2403,"timestamp":6402904741,"id":86,"parentId":1,"tags":{},"startTime":1759897915222,"traceId":"e89bafd0800fa0ea"},{"name":"telemetry-flush","duration":27,"timestamp":6402907156,"id":87,"parentId":1,"tags":{},"startTime":1759897915225,"traceId":"e89bafd0800fa0ea"},{"name":"next-build","duration":16974586,"timestamp":6385932600,"id":1,"tags":{"buildMode":"default","isTurboBuild":"true","version":"15.5.4","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1759897898250,"traceId":"e89bafd0800fa0ea"}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prismaClient.d.ts","sourceRoot":"","sources":["../../src/lib/prismaClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,cAAc,8BAA8B,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,CAAA;AACvB,eAAe,YAAY,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process'
|
|
2
|
+
import { createRequire } from 'node:module'
|
|
2
3
|
import process from 'node:process'
|
|
4
|
+
import { fileURLToPath } from 'node:url'
|
|
3
5
|
import { CliError } from '../../utils/errors'
|
|
4
6
|
import { ensureEnv, ensureDatabaseUrl } from '../../utils/env'
|
|
5
7
|
|
|
@@ -7,21 +9,46 @@ export type PrismaDeployOptions = {
|
|
|
7
9
|
schema?: string
|
|
8
10
|
}
|
|
9
11
|
|
|
12
|
+
const packageRoot = fileURLToPath(new URL('../../..', import.meta.url))
|
|
13
|
+
const defaultSchemaPath = fileURLToPath(
|
|
14
|
+
new URL('../../../prisma/schema.prisma', import.meta.url),
|
|
15
|
+
)
|
|
16
|
+
const nodeRequire = createRequire(import.meta.url)
|
|
17
|
+
|
|
10
18
|
export const prismaDeploy = async ({ schema }: PrismaDeployOptions = {}) => {
|
|
11
19
|
await ensureEnv()
|
|
12
20
|
ensureDatabaseUrl()
|
|
13
21
|
|
|
14
22
|
await new Promise<void>((resolve, reject) => {
|
|
15
|
-
const args = ['
|
|
23
|
+
const args = ['migrate', 'deploy']
|
|
24
|
+
const schemaPath = schema ?? defaultSchemaPath
|
|
25
|
+
|
|
26
|
+
if (schemaPath) {
|
|
27
|
+
args.push('--schema', schemaPath)
|
|
28
|
+
}
|
|
16
29
|
|
|
17
|
-
|
|
18
|
-
|
|
30
|
+
let prismaCliPath: string
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
prismaCliPath = nodeRequire.resolve('prisma/build/index.js', {
|
|
34
|
+
paths: [packageRoot],
|
|
35
|
+
})
|
|
36
|
+
} catch (error) {
|
|
37
|
+
reject(
|
|
38
|
+
new CliError(
|
|
39
|
+
'Unable to resolve Prisma CLI. Install `prisma` dependency.',
|
|
40
|
+
{
|
|
41
|
+
cause: error,
|
|
42
|
+
},
|
|
43
|
+
),
|
|
44
|
+
)
|
|
45
|
+
return
|
|
19
46
|
}
|
|
20
47
|
|
|
21
|
-
const child = spawn(
|
|
48
|
+
const child = spawn(process.execPath, [prismaCliPath, ...args], {
|
|
49
|
+
cwd: packageRoot,
|
|
22
50
|
stdio: 'inherit',
|
|
23
51
|
env: process.env,
|
|
24
|
-
shell: true,
|
|
25
52
|
})
|
|
26
53
|
|
|
27
54
|
child.once('error', (error) => {
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process'
|
|
2
|
+
import { createRequire } from 'node:module'
|
|
3
|
+
import process from 'node:process'
|
|
4
|
+
import { fileURLToPath } from 'node:url'
|
|
1
5
|
import type { PrismaClient } from '@prisma/client'
|
|
2
6
|
import { CliError } from './errors'
|
|
3
7
|
|
|
@@ -10,6 +14,12 @@ type PrismaModule = {
|
|
|
10
14
|
prisma?: PrismaClient
|
|
11
15
|
}
|
|
12
16
|
|
|
17
|
+
const packageRoot = fileURLToPath(new URL('../..', import.meta.url))
|
|
18
|
+
const schemaPath = fileURLToPath(
|
|
19
|
+
new URL('../../prisma/schema.prisma', import.meta.url),
|
|
20
|
+
)
|
|
21
|
+
const nodeRequire = createRequire(import.meta.url)
|
|
22
|
+
|
|
13
23
|
const isModuleNotFoundError = (error: unknown, modulePath: string) => {
|
|
14
24
|
if (!(error instanceof Error)) return false
|
|
15
25
|
|
|
@@ -30,12 +40,94 @@ const isModuleNotFoundError = (error: unknown, modulePath: string) => {
|
|
|
30
40
|
)
|
|
31
41
|
}
|
|
32
42
|
|
|
43
|
+
const isPrismaClientNotGeneratedError = (error: unknown) => {
|
|
44
|
+
if (!(error instanceof Error)) return false
|
|
45
|
+
return /prisma\s+client\s+did\s+not\s+initialize|Please\s+run\s+"prisma\s+generate"/i.test(
|
|
46
|
+
error.message,
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const generatePrismaClient = async () => {
|
|
51
|
+
let prismaCliPath: string
|
|
52
|
+
|
|
53
|
+
try {
|
|
54
|
+
prismaCliPath = nodeRequire.resolve('prisma/build/index.js', {
|
|
55
|
+
paths: [packageRoot],
|
|
56
|
+
})
|
|
57
|
+
} catch (error) {
|
|
58
|
+
throw new CliError(
|
|
59
|
+
'Unable to resolve Prisma CLI. Install `prisma` dependency.',
|
|
60
|
+
{
|
|
61
|
+
cause: error,
|
|
62
|
+
},
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
await new Promise<void>((resolve, reject) => {
|
|
67
|
+
const child = spawn(
|
|
68
|
+
process.execPath,
|
|
69
|
+
[prismaCliPath, 'generate', '--schema', schemaPath],
|
|
70
|
+
{
|
|
71
|
+
cwd: packageRoot,
|
|
72
|
+
stdio: 'inherit',
|
|
73
|
+
env: process.env,
|
|
74
|
+
},
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
child.once('error', (error) => {
|
|
78
|
+
reject(new CliError('Failed to run `prisma generate`.', { cause: error }))
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
child.once('exit', (code) => {
|
|
82
|
+
if (typeof code === 'number' && code !== 0) {
|
|
83
|
+
reject(new CliError(`prisma generate exited with code ${code}.`))
|
|
84
|
+
return
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
resolve()
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const clearPrismaClientCache = () => {
|
|
93
|
+
const requests = [
|
|
94
|
+
'@prisma/client',
|
|
95
|
+
'@prisma/client/index.js',
|
|
96
|
+
'.prisma/client/index.js',
|
|
97
|
+
'.prisma/client/default.js',
|
|
98
|
+
] as const
|
|
99
|
+
|
|
100
|
+
for (const request of requests) {
|
|
101
|
+
try {
|
|
102
|
+
const resolved = nodeRequire.resolve(request, { paths: [packageRoot] })
|
|
103
|
+
delete nodeRequire.cache[resolved]
|
|
104
|
+
} catch (error) {
|
|
105
|
+
// ignore cache misses
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const importPrismaModule = async (
|
|
111
|
+
candidate: string,
|
|
112
|
+
forceReload: boolean,
|
|
113
|
+
): Promise<PrismaModule> => {
|
|
114
|
+
const url = new URL(candidate, import.meta.url)
|
|
115
|
+
|
|
116
|
+
if (forceReload) {
|
|
117
|
+
url.searchParams.set('ts', Date.now().toString())
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return (await import(url.href)) as PrismaModule
|
|
121
|
+
}
|
|
122
|
+
|
|
33
123
|
export const loadPrismaClient = async (): Promise<PrismaClient> => {
|
|
34
124
|
let lastError: unknown
|
|
125
|
+
let attemptedGenerate = false
|
|
35
126
|
|
|
36
|
-
for (
|
|
127
|
+
for (let index = 0; index < prismaModuleCandidates.length; index += 1) {
|
|
128
|
+
const candidate = prismaModuleCandidates[index]
|
|
37
129
|
try {
|
|
38
|
-
const module =
|
|
130
|
+
const module = await importPrismaModule(candidate, attemptedGenerate)
|
|
39
131
|
if (module?.prisma) {
|
|
40
132
|
return module.prisma
|
|
41
133
|
}
|
|
@@ -44,6 +136,20 @@ export const loadPrismaClient = async (): Promise<PrismaClient> => {
|
|
|
44
136
|
`Module "${candidate}" does not export a prisma client.`,
|
|
45
137
|
)
|
|
46
138
|
} catch (error) {
|
|
139
|
+
if (isPrismaClientNotGeneratedError(error)) {
|
|
140
|
+
if (attemptedGenerate) {
|
|
141
|
+
throw new CliError('Prisma client failed to initialize.', {
|
|
142
|
+
cause: error,
|
|
143
|
+
})
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
await generatePrismaClient()
|
|
147
|
+
clearPrismaClientCache()
|
|
148
|
+
attemptedGenerate = true
|
|
149
|
+
index -= 1
|
|
150
|
+
continue
|
|
151
|
+
}
|
|
152
|
+
|
|
47
153
|
if (isModuleNotFoundError(error, candidate)) {
|
|
48
154
|
lastError = error
|
|
49
155
|
continue
|
|
File without changes
|