heapdump.ts
commands/heapdump/heapdump.ts
18
Lines
398
Bytes
1
Exports
1
Imports
10
Keywords
What this is
This page documents one file from the repository and includes its full source so you can read it without leaving the docs site.
Beginner explanation
This file lives in the command layer. It likely turns a user action into concrete program behavior.
How it is used
Start from the exports list and related files. Those are the easiest clues for where this file fits into the system.
Expert explanation
Architecturally, this file intersects with commands. It contains 18 lines, 1 detected imports, and 1 detected exports.
Important relationships
Detected exports
call
Keywords
resulttextperformheapdumputilsheapdumpservicecallpromisesuccessfailedcreate
Detected imports
../../utils/heapDumpService.js
Source notes
This page embeds the full file contents. Small or leaf files are still indexed honestly instead of being over-explained.
Full source
import { performHeapDump } from '../../utils/heapDumpService.js'
export async function call(): Promise<{ type: 'text'; value: string }> {
const result = await performHeapDump()
if (!result.success) {
return {
type: 'text',
value: `Failed to create heap dump: ${result.error}`,
}
}
return {
type: 'text',
value: `${result.heapPath}\n${result.diagPath}`,
}
}