aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-registry/mockdebug/init.lua
blob: 898c8973f637a44bd4195a3053194f6c0a00ce27 (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
24
25
26
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 = _.dedent [[
        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,
}