mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
383 lines
12 KiB
JSON
383 lines
12 KiB
JSON
{
|
|
"name": "bun-vscode",
|
|
"version": "0.0.31",
|
|
"author": "oven",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/oven-sh/bun"
|
|
},
|
|
"main": "dist/extension.js",
|
|
"devDependencies": {
|
|
"@types/bun": "^1.1.10",
|
|
"@types/vscode": "^1.60.0",
|
|
"@vscode/debugadapter": "^1.56.0",
|
|
"@vscode/debugadapter-testsupport": "^1.56.0",
|
|
"@vscode/test-cli": "^0.0.10",
|
|
"@vscode/test-electron": "^2.4.1",
|
|
"@vscode/vsce": "^2.20.1",
|
|
"esbuild": "^0.19.2",
|
|
"typescript": "^5.0.0"
|
|
},
|
|
"activationEvents": [
|
|
"onStartupFinished"
|
|
],
|
|
"bugs": {
|
|
"url": "https://github.com/oven-sh/bun/issues"
|
|
},
|
|
"capabilities": {
|
|
"untrustedWorkspaces": {
|
|
"supported": false,
|
|
"description": "This extension needs to be able to run your code using Bun."
|
|
}
|
|
},
|
|
"categories": [
|
|
"Programming Languages",
|
|
"Debuggers",
|
|
"Testing"
|
|
],
|
|
"contributes": {
|
|
"configuration": {
|
|
"title": "Bun",
|
|
"properties": {
|
|
"bun.runtime": {
|
|
"type": "string",
|
|
"description": "A path to the `bun` executable. By default, the extension looks for `bun` in the `PATH`, but if set, it will use the specified path instead.",
|
|
"scope": "window",
|
|
"default": null
|
|
},
|
|
"bun.diagnosticsSocket.enabled": {
|
|
"type": "boolean",
|
|
"description": "If Bun extension should communicate with Bun over a socket to show errors in editor.",
|
|
"scope": "window",
|
|
"default": true
|
|
},
|
|
"bun.bunlockb.enabled": {
|
|
"type": "boolean",
|
|
"description": "If visual lockfile viewer (`bun.lockb`) should be enabled ",
|
|
"scope": "window",
|
|
"default": true
|
|
},
|
|
"bun.debugTerminal.enabled": {
|
|
"type": "boolean",
|
|
"description": "If Bun should be added to the JavaScript Debug Terminal.",
|
|
"scope": "window",
|
|
"default": true
|
|
},
|
|
"bun.debugTerminal.stopOnEntry": {
|
|
"type": "boolean",
|
|
"description": "If the debugger should stop on the first line when used in the JavaScript Debug Terminal.",
|
|
"scope": "window",
|
|
"default": false
|
|
},
|
|
"bun.test.filePattern": {
|
|
"type": "string",
|
|
"default": "**/*{.test.,.spec.,_test_,_spec_}{js,ts,tsx,jsx,mts,cts,cjs,mjs}",
|
|
"description": "Glob pattern to find test files"
|
|
},
|
|
"bun.test.customFlag": {
|
|
"type": "string",
|
|
"default": "",
|
|
"description": "Custom flag added to the end of test command"
|
|
},
|
|
"bun.test.customScript": {
|
|
"type": "string",
|
|
"default": "bun test",
|
|
"description": "Custom script to use instead of `bun test`, for example script from `package.json`"
|
|
},
|
|
"bun.test.enable": {
|
|
"type": "boolean",
|
|
"description": "If the test explorer should be enabled and integrated with your editor",
|
|
"scope": "window",
|
|
"default": true
|
|
}
|
|
}
|
|
},
|
|
"commands": [
|
|
{
|
|
"command": "extension.bun.runFile",
|
|
"title": "Run File",
|
|
"shortTitle": "Run",
|
|
"category": "Bun",
|
|
"enablement": "!inDebugMode",
|
|
"icon": "$(play)"
|
|
},
|
|
{
|
|
"command": "extension.bun.debugFile",
|
|
"title": "Debug File",
|
|
"shortTitle": "Debug",
|
|
"category": "Bun",
|
|
"enablement": "!inDebugMode",
|
|
"icon": "$(debug-alt)"
|
|
},
|
|
{
|
|
"command": "extension.bun.runUnsavedCode",
|
|
"title": "Run Unsaved Code with Bun",
|
|
"shortTitle": "Run with Bun",
|
|
"category": "Bun",
|
|
"enablement": "!inDebugMode && resourceLangId =~ /^(javascript|typescript|javascriptreact|typescriptreact)$/ && !isInDiffEditor && resourceScheme == 'untitled'",
|
|
"icon": "$(play-circle)"
|
|
}
|
|
],
|
|
"menus": {
|
|
"editor/title/run": [
|
|
{
|
|
"command": "extension.bun.runFile",
|
|
"when": "resourceLangId == javascript || resourceLangId == javascriptreact || resourceLangId == typescript || resourceLangId == typescriptreact",
|
|
"group": "navigation@1"
|
|
},
|
|
{
|
|
"command": "extension.bun.debugFile",
|
|
"when": "resourceLangId == javascript || resourceLangId == javascriptreact || resourceLangId == typescript || resourceLangId == typescriptreact",
|
|
"group": "navigation@2"
|
|
}
|
|
],
|
|
"commandPalette": [
|
|
{
|
|
"command": "extension.bun.runFile",
|
|
"when": "resourceLangId == javascript || resourceLangId == javascriptreact || resourceLangId == typescript || resourceLangId == typescriptreact"
|
|
},
|
|
{
|
|
"command": "extension.bun.debugFile",
|
|
"when": "resourceLangId == javascript || resourceLangId == javascriptreact || resourceLangId == typescript || resourceLangId == typescriptreact"
|
|
}
|
|
],
|
|
"editor/title": [
|
|
{
|
|
"command": "extension.bun.runUnsavedCode",
|
|
"when": "resourceLangId =~ /^(javascript|typescript|javascriptreact|typescriptreact)$/ && !isInDiffEditor && resourceScheme == 'untitled'",
|
|
"group": "navigation"
|
|
}
|
|
],
|
|
"editor/context": [
|
|
{
|
|
"command": "extension.bun.runUnsavedCode",
|
|
"when": "resourceLangId =~ /^(javascript|typescript|javascriptreact|typescriptreact)$/ && !isInDiffEditor && resourceScheme == 'untitled'",
|
|
"group": "1_run"
|
|
}
|
|
]
|
|
},
|
|
"breakpoints": [
|
|
{
|
|
"language": "javascript"
|
|
},
|
|
{
|
|
"language": "javascriptreact"
|
|
},
|
|
{
|
|
"language": "typescript"
|
|
},
|
|
{
|
|
"language": "typescriptreact"
|
|
}
|
|
],
|
|
"debuggers": [
|
|
{
|
|
"type": "bun",
|
|
"label": "Bun",
|
|
"languages": [
|
|
"javascript",
|
|
"javascriptreact",
|
|
"typescript",
|
|
"typescriptreact"
|
|
],
|
|
"runtime": "node",
|
|
"program": "dist/adapter.js",
|
|
"configurationAttributes": {
|
|
"launch": {
|
|
"required": [
|
|
"program"
|
|
],
|
|
"properties": {
|
|
"runtime": {
|
|
"type": "string",
|
|
"description": "The path to the `bun` executable. Defaults to `PATH` environment variable.",
|
|
"default": "bun"
|
|
},
|
|
"runtimeArgs": {
|
|
"type": "array",
|
|
"description": "The command-line arguments passed to the `bun` executable. Unlike `args`, these arguments are not passed to the program, but to the `bun` executable itself.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"default": []
|
|
},
|
|
"program": {
|
|
"type": "string",
|
|
"description": "The path to a JavaScript or TypeScript file.",
|
|
"default": "${file}"
|
|
},
|
|
"args": {
|
|
"type": "array",
|
|
"description": "The command-line arguments passed to the program.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"default": []
|
|
},
|
|
"cwd": {
|
|
"type": "string",
|
|
"description": "The working directory.",
|
|
"default": "${workspaceFolder}"
|
|
},
|
|
"env": {
|
|
"type": "object",
|
|
"description": "The environment variables to pass to Bun.",
|
|
"default": {}
|
|
},
|
|
"strictEnv": {
|
|
"type": "boolean",
|
|
"description": "If environment variables should not be inherited from the parent process.",
|
|
"default": false
|
|
},
|
|
"stopOnEntry": {
|
|
"type": "boolean",
|
|
"description": "If the debugger should stop on the first line of the program.",
|
|
"default": false
|
|
},
|
|
"noDebug": {
|
|
"type": "boolean",
|
|
"description": "If the debugger should be disabled.",
|
|
"default": false
|
|
},
|
|
"watchMode": {
|
|
"type": [
|
|
"boolean",
|
|
"string"
|
|
],
|
|
"description": "If the process should be restarted when files change. Equivalent to passing `--watch` or `--hot` to the `bun` executable.",
|
|
"enum": [
|
|
true,
|
|
false,
|
|
"hot"
|
|
],
|
|
"default": false
|
|
}
|
|
}
|
|
},
|
|
"attach": {
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"description": "The URL of the WebSocket inspector to attach to."
|
|
},
|
|
"noDebug": {
|
|
"type": "boolean",
|
|
"description": "If the debugger should be disabled.",
|
|
"default": false
|
|
},
|
|
"stopOnEntry": {
|
|
"type": "boolean",
|
|
"description": "If the debugger should stop on the first line of the program.",
|
|
"default": false
|
|
},
|
|
"localRoot": {
|
|
"type": "string",
|
|
"description": "The local path that maps to \"remoteRoot\" when attaching to a remote Bun process."
|
|
},
|
|
"remoteRoot": {
|
|
"type": "string",
|
|
"description": "The remote path to the code when attaching. File paths reported by Bun that start with this path will be mapped back to 'localRoot'."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"languages": [
|
|
{
|
|
"id": "bun.lockb",
|
|
"aliases": [
|
|
"bun.lockb"
|
|
],
|
|
"filenames": [
|
|
"bun.lockb"
|
|
],
|
|
"icon": {
|
|
"dark": "assets/icon-small.png",
|
|
"light": "assets/icon-small.png"
|
|
}
|
|
},
|
|
{
|
|
"id": "jsonc",
|
|
"filenames": [
|
|
"bun.lock"
|
|
]
|
|
}
|
|
],
|
|
"jsonValidation": [
|
|
{
|
|
"fileMatch": "package.json",
|
|
"url": "./assets/package.json"
|
|
},
|
|
{
|
|
"fileMatch": "bun.lock",
|
|
"url": "./assets/bun.lock.json"
|
|
}
|
|
],
|
|
"customEditors": [
|
|
{
|
|
"viewType": "bun.lockb",
|
|
"displayName": "bun.lockb",
|
|
"selector": [
|
|
{
|
|
"filenamePattern": "*bun.lockb"
|
|
}
|
|
],
|
|
"priority": "default"
|
|
}
|
|
],
|
|
"taskDefinitions": [
|
|
{
|
|
"type": "bun",
|
|
"required": [
|
|
"script"
|
|
],
|
|
"properties": {
|
|
"script": {
|
|
"type": "string",
|
|
"description": "The script to execute"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"description": "The Visual Studio Code extension for Bun.",
|
|
"displayName": "Bun for Visual Studio Code",
|
|
"engines": {
|
|
"vscode": "^1.60.0"
|
|
},
|
|
"extensionKind": [
|
|
"workspace"
|
|
],
|
|
"galleryBanner": {
|
|
"color": "#3B3738",
|
|
"theme": "dark"
|
|
},
|
|
"homepage": "https://bun.com/",
|
|
"icon": "assets/icon.png",
|
|
"keywords": [
|
|
"bun",
|
|
"node.js",
|
|
"javascript",
|
|
"typescript",
|
|
"vscode"
|
|
],
|
|
"license": "MIT",
|
|
"publisher": "oven",
|
|
"scripts": {
|
|
"build": "node scripts/build.mjs",
|
|
"pretest": "bun run build",
|
|
"test": "node scripts/test.mjs",
|
|
"dev": "vscode-test --config scripts/dev.mjs",
|
|
"prepublish": "npm version patch && bun run build",
|
|
"publish": "cd extension && bunx vsce publish"
|
|
},
|
|
"workspaceTrust": {
|
|
"request": "never"
|
|
},
|
|
"workspaces": [
|
|
"../bun-debug-adapter-protocol",
|
|
"../bun-inspector-protocol"
|
|
]
|
|
}
|