aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-registry/mockdebug/init.lua
blob: 9898b2df8b2e8a2915c86a63ba55f2f13447cb8a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
local Pkg = require "mason.core.package"
local github = require "mason.core.managers.github"
local git = require "mason.core.managers.git"
local _ = require "mason.core.functional"
local Optional = require "mason.core.optional"

return Pkg.new {
    name = "mockdebug",
    desc = [[Mock Debug simulates a debug adapter. It supports step, continue, breakpoints, exceptions, and variable access but it is not connected to any real debugger.]],
    homepage = "https://github.com/microsoft/vscode-mock-debug",
    languages = {},
    categories = { Pkg.Cat.DAP },
    ---@async
    ---@param ctx InstallContext
    install = function(ctx)
        local source = github.tag { repo = "microsoft/vscode-mock-debug" }
        source.with_receipt()
        git.clone { "https://github.com/microsoft/vscode-mock-debug", version = Optional.of(source.tag) }
        ctx.spawn.npm { "install" }
        ctx.spawn.npm { "run", "compile" }
        ctx.spawn.npm { "install", "--production" }
    end,
}