diff options
| author | William Boman <william@redwill.se> | 2022-07-08 17:36:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-08 17:36:10 +0200 |
| commit | 8cad2361dd63c67d95acf9f79321927b03843959 (patch) | |
| tree | 951599a91b56cc5be5220fe645e0c5323d21ae83 /lua/mason-registry/node-debug2-adapter/init.lua | |
| parent | fix(ui): read from correct path in the receipt to gather linked bins (#26) (diff) | |
| download | mason-8cad2361dd63c67d95acf9f79321927b03843959.tar mason-8cad2361dd63c67d95acf9f79321927b03843959.tar.gz mason-8cad2361dd63c67d95acf9f79321927b03843959.tar.bz2 mason-8cad2361dd63c67d95acf9f79321927b03843959.tar.lz mason-8cad2361dd63c67d95acf9f79321927b03843959.tar.xz mason-8cad2361dd63c67d95acf9f79321927b03843959.tar.zst mason-8cad2361dd63c67d95acf9f79321927b03843959.zip | |
refactor: move packages to mason-registry (#27)
Diffstat (limited to 'lua/mason-registry/node-debug2-adapter/init.lua')
| -rw-r--r-- | lua/mason-registry/node-debug2-adapter/init.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lua/mason-registry/node-debug2-adapter/init.lua b/lua/mason-registry/node-debug2-adapter/init.lua new file mode 100644 index 00000000..44b96c2d --- /dev/null +++ b/lua/mason-registry/node-debug2-adapter/init.lua @@ -0,0 +1,28 @@ +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 path = require "mason.core.path" +local Optional = require "mason.core.optional" + +return Pkg.new { + name = "node-debug2-adapter", + desc = [[A debug adapter that supports debugging Node via the Chrome Debugging Protocol. No longer maintained.]], + homepage = "https://github.com/microsoft/vscode-node-debug2", + languages = { Pkg.Lang.JavaScript, Pkg.Lang.TypeScript }, + categories = { Pkg.Cat.DAP }, + ---@async + ---@param ctx InstallContext + install = function(ctx) + local source = github.tag { repo = "microsoft/vscode-node-debug2" } + source.with_receipt() + git.clone { "https://github.com/microsoft/vscode-node-debug2", version = Optional.of(source.tag) } + ctx.spawn.npm { "install" } + ctx.spawn.npm { "run", "build" } + ctx.spawn.npm { "install", "--production" } + ctx:link_bin( + "node-debug2-adapter", + ctx:write_node_exec_wrapper("node-debug2-adapter", path.concat { "out", "src", "nodeDebug.js" }) + ) + end, +} |
