Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
1 line
No EOL
2.7 KiB
Text
1 line
No EOL
2.7 KiB
Text
{"version":3,"sources":["../../../../src/server/mcp/tools/get-logs.ts"],"sourcesContent":["/**\n * MCP tool for getting the path to the Next.js development log file.\n *\n * This tool returns the path to the {nextConfig.distDir}/logs/next-development.log file\n * that contains browser console logs and other development information.\n */\nimport type { McpServer } from 'next/dist/compiled/@modelcontextprotocol/sdk/server/mcp'\nimport { stat } from 'fs/promises'\nimport { join } from 'path'\nimport { mcpTelemetryTracker } from '../mcp-telemetry-tracker'\n\nexport function registerGetLogsTool(server: McpServer, distDir: string) {\n server.registerTool(\n 'get_logs',\n {\n description:\n 'Get the path to the Next.js development log file. Returns the file path so the agent can read the logs directly.',\n },\n async () => {\n // Track telemetry\n mcpTelemetryTracker.recordToolCall('mcp/get_logs')\n\n try {\n const logFilePath = join(distDir, 'logs', 'next-development.log')\n\n // Check if the log file exists\n try {\n await stat(logFilePath)\n } catch (error) {\n return {\n content: [\n {\n type: 'text',\n text: `Log file not found at ${logFilePath}.`,\n },\n ],\n }\n }\n\n return {\n content: [\n {\n type: 'text',\n text: `Next.js log file path: ${logFilePath}`,\n },\n ],\n }\n } catch (error) {\n return {\n content: [\n {\n type: 'text',\n text: `Error getting log file path: ${error instanceof Error ? error.message : String(error)}`,\n },\n ],\n }\n }\n }\n )\n}\n"],"names":["registerGetLogsTool","server","distDir","registerTool","description","mcpTelemetryTracker","recordToolCall","logFilePath","join","stat","error","content","type","text","Error","message","String"],"mappings":"AAAA;;;;;CAKC;;;;+BAMeA;;;eAAAA;;;0BAJK;sBACA;qCACe;AAE7B,SAASA,oBAAoBC,MAAiB,EAAEC,OAAe;IACpED,OAAOE,YAAY,CACjB,YACA;QACEC,aACE;IACJ,GACA;QACE,kBAAkB;QAClBC,wCAAmB,CAACC,cAAc,CAAC;QAEnC,IAAI;YACF,MAAMC,cAAcC,IAAAA,UAAI,EAACN,SAAS,QAAQ;YAE1C,+BAA+B;YAC/B,IAAI;gBACF,MAAMO,IAAAA,cAAI,EAACF;YACb,EAAE,OAAOG,OAAO;gBACd,OAAO;oBACLC,SAAS;wBACP;4BACEC,MAAM;4BACNC,MAAM,CAAC,sBAAsB,EAAEN,YAAY,CAAC,CAAC;wBAC/C;qBACD;gBACH;YACF;YAEA,OAAO;gBACLI,SAAS;oBACP;wBACEC,MAAM;wBACNC,MAAM,CAAC,uBAAuB,EAAEN,aAAa;oBAC/C;iBACD;YACH;QACF,EAAE,OAAOG,OAAO;YACd,OAAO;gBACLC,SAAS;oBACP;wBACEC,MAAM;wBACNC,MAAM,CAAC,6BAA6B,EAAEH,iBAAiBI,QAAQJ,MAAMK,OAAO,GAAGC,OAAON,QAAQ;oBAChG;iBACD;YACH;QACF;IACF;AAEJ","ignoreList":[0]} |