init
This commit is contained in:
commit
ec53fcbe95
1905 changed files with 513762 additions and 0 deletions
17
commands/heapdump/heapdump.ts
Normal file
17
commands/heapdump/heapdump.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
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}`,
|
||||
}
|
||||
}
|
||||
12
commands/heapdump/index.ts
Normal file
12
commands/heapdump/index.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import type { Command } from '../../commands.js'
|
||||
|
||||
const heapDump = {
|
||||
type: 'local',
|
||||
name: 'heapdump',
|
||||
description: 'Dump the JS heap to ~/Desktop',
|
||||
isHidden: true,
|
||||
supportsNonInteractive: true,
|
||||
load: () => import('./heapdump.js'),
|
||||
} satisfies Command
|
||||
|
||||
export default heapDump
|
||||
Loading…
Add table
Add a link
Reference in a new issue