blob: 3896488032f8001eb0b9b1aba2206c992d8b9dc4 [file] [log] [blame]
{
"name": "apache-daffodil-vscode",
"displayName": "Apache Daffodil VS Code Extension",
"description": "VS Code extension for Apache Daffodil DFDL schema debugging",
"version": "1.0.0",
"daffodilVersion": "3.3.0",
"publisher": "asf",
"author": "Apache Daffodil",
"license": "Apache-2.0",
"engines": {
"vscode": "^1.55.0"
},
"icon": "images/daffodil.ico",
"categories": [
"Debuggers",
"Snippets"
],
"repository": {
"type": "git",
"url": "https://github.com/apache/daffodil-vscode.git"
},
"bugs": {
"url": "https://github.com/apache/daffodil-vscode/issues"
},
"scripts": {
"vscode:prepublish": "yarn run package-ext",
"precompile": "node -p \"'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
"compile": "tsc -p ./",
"lint": "yarn run prettier src -c",
"watch": "webpack --watch --devtool nosources-source-map --info-verbosity verbose --config ./build/extension.webpack.config.js",
"watch2": "tsc -watch -p ./",
"package": "vsce package",
"publish": "vsce publish",
"package-ext": "webpack --mode production --config ./build/extension.webpack.config.js",
"pretest": "yarn run compile",
"test": "node node_modules/mocha/bin/_mocha -u tdd --timeout 999999 --colors ./out/tests",
"sbt": "sbt universal:packageBin",
"pre-build": "mv LICENSE tmp.LICENSE && mv NOTICE tmp.NOTICE && cp build/bin.LICENSE LICENSE && cp build/bin.NOTICE NOTICE",
"build": "yarn pre-build && yarn sbt && yarn install && yarn compile && yarn package && yarn post-build",
"post-build": "rm -rf NOTICE LICENSE && mv tmp.LICENSE LICENSE && mv tmp.NOTICE NOTICE"
},
"dependencies": {
"await-notify": "1.0.1",
"child_process": "^1.0.2",
"hexy": "^0.3.1",
"unzip-stream": "^0.3.1",
"vscode-debugadapter": "^1.46.0",
"xdg-app-paths": "^7.3.0"
},
"devDependencies": {
"@types/glob": "^7.1.3",
"@types/mocha": "^8.2.2",
"@types/node": "^14.14.37",
"@types/vscode": "^1.55.0",
"glob": "^7.1.6",
"mocha": "^8.3.2",
"prettier": "^2.3.2",
"ts-loader": "^8.1.0",
"typescript": "^4.2.3",
"vsce": "^1.87.1",
"vscode-debugadapter-testsupport": "^1.46.0",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12"
},
"main": "./dist/ext/extension.js",
"browser": "./dist/web/extension.js",
"activationEvents": [
"onDebugResolve:dfdl",
"onDebugDynamicConfigurations:dfdl",
"onCommand:extension.dfdl-debug.getProgramName",
"onCommand:extension.dfdl-debug.getDataName",
"onCommand:extension.dfdl-debug.runEditorContents",
"onCommand:extension.dfdl-debug.debugEditorContents",
"onCommand:launch.config"
],
"workspaceTrust": {
"request": "never"
},
"contributes": {
"snippets": [
{
"language": "xml",
"path": "./snippets/dfdl.json"
}
],
"menus": {
"editor/title": [
{
"command": "launch.config",
"group": "navigation@1"
},
{
"command": "hexview.display",
"when": "resourceLangId == xml",
"group": "navigation@4"
},
{
"command": "infoset.display",
"when": "resourceLangId == xml",
"group": "navigation@2"
},
{
"command": "infoset.diff",
"when": "resourceLangId == xml",
"group": "navigation@3"
}
],
"editor/title/run": [
{
"command": "extension.dfdl-debug.runEditorContents",
"when": "resourceLangId == xml"
},
{
"command": "extension.dfdl-debug.debugEditorContents",
"when": "resourceLangId == xml"
}
],
"commandPalette": [
{
"command": "extension.dfdl-debug.debugEditorContents",
"when": "resourceLangId == xml"
},
{
"command": "extension.dfdl-debug.runEditorContents",
"when": "resourceLangId == xml"
}
],
"debug/variables/context": [
{
"command": "extension.dfdl-debug.toggleFormatting",
"when": "debugType == 'dfdl' && debugProtocolVariableMenuContext == 'simple'"
}
]
},
"commands": [
{
"command": "extension.dfdl-debug.debugEditorContents",
"title": "Debug File",
"category": "Daffodil Debug",
"enablement": "!inDebugMode",
"icon": "$(debug-alt)"
},
{
"command": "extension.dfdl-debug.runEditorContents",
"title": "Run File",
"category": "Daffodil Debug",
"enablement": "!inDebugMode",
"icon": "$(play)"
},
{
"command": "extension.dfdl-debug.toggleFormatting",
"title": "Toggle between decimal and hex formatting",
"category": "Daffodil Debug",
"enablement": "inDebugMode"
},
{
"command": "hexview.display",
"title": "Display the hex view",
"category": "Daffodil Debug",
"enablement": "inDebugMode",
"icon": "$(file-binary)"
},
{
"command": "infoset.display",
"title": "Display the infoset view",
"category": "Daffodil Debug",
"enablement": "inDebugMode",
"icon": "$(file-code)"
},
{
"command": "infoset.diff",
"title": "View infoset diff",
"category": "Daffodil Debug",
"enablement": "inDebugMode",
"icon": "$(diff)"
},
{
"command": "infoset.save",
"title": "Save the current infoset",
"category": "Daffodil Debug",
"enablement": "inDebugMode"
},
{
"command": "launch.config",
"title": "Configure launch.json",
"category": "Daffodil Debug",
"enablement": "!inDebugMode",
"icon": "$(debug-configure)"
}
],
"breakpoints": [
{
"language": "xml"
}
],
"debuggers": [
{
"type": "dfdl",
"languages": [
"xml"
],
"label": "Daffodil Debug",
"program": "./out/extension.js",
"runtime": "node",
"configurationAttributes": {
"launch": {
"required": [
"program",
"data"
],
"properties": {
"program": {
"type": "string",
"description": "Absolute path to the DFDL schema file.",
"default": "${command:AskForProgramName}"
},
"data": {
"type": "string",
"description": "Absolute path to the input data file.",
"default": "${command:AskForDataName}"
},
"infosetOutput": {
"type": "object",
"description": "Destination for final Infoset (file-path | 'console' | 'none')",
"default": {
"type": "console",
"path": "${workspaceFolder}/infoset.xml"
}
},
"stopOnEntry": {
"type": "boolean",
"description": "Automatically stop after launch.",
"default": true
},
"trace": {
"type": "boolean",
"description": "Enable logging of the Debug Adapter Protocol.",
"default": true
},
"debugServer": {
"type": "integer",
"description": "Port debug server running on",
"default": 4711
},
"useExistingServer": {
"type": "boolean",
"description": "Enable connection to running DAP Server",
"default": false
},
"openHexView": {
"type": "boolean",
"description": "Open hexview on debug start",
"default": false
},
"openInfosetView": {
"type": "boolean",
"description": "Open hexview on debug start",
"default": false
},
"openInfosetDiffView": {
"type": "boolean",
"description": "Open hexview on debug start",
"default": false
},
"daffodilDebugClasspath": {
"type": "string",
"description": "Additional classpaths to be exported to the debugger",
"default": ""
}
}
}
},
"initialConfigurations": [
{
"type": "dfdl",
"request": "launch",
"name": "Ask for file name",
"program": "${command:AskForProgramName}",
"stopOnEntry": true,
"data": "${command:AskForDataName}",
"infosetOutput": {
"type": "file",
"path": "${workspaceFolder}/infoset.xml"
},
"debugServer": 4711,
"openHexView": false,
"openInfosetView": false,
"openInfosetDiffView": false,
"daffodilDebugClasspath": ""
}
],
"configurationSnippets": [
{
"label": "Daffodil Debug: Launch",
"description": "A new configuration for 'debugging' a user selected xml file.",
"body": {
"type": "dfdl",
"request": "launch",
"name": "Ask for file name",
"program": "^\"\\${command:AskForProgramName}\"",
"stopOnEntry": true,
"data": "^\"\\${command:AskForDataName}\"",
"infosetOutput": {
"type": "file",
"path": "${workspaceFolder}/infoset.xml"
},
"debugServer": 4711,
"openHexView": false,
"openInfosetView": false,
"openInfosetDiffView": false,
"daffodilDebugClasspath": ""
}
}
],
"variables": {
"AskForProgramName": "extension.dfdl-debug.getProgramName",
"AskForDataName": "extension.dfdl-debug.getDataName"
}
}
],
"configuration": [
{
"title": "Daffodil Debugger Global",
"properties": {
"type": {
"type": "string",
"default": "dfdl"
},
"program": {
"type": "string",
"description": "Absolute path to the DFDL schema file.",
"default": "${command:AskForProgramName}"
},
"data": {
"type": "string",
"description": "Absolute path to the input data file.",
"default": "${command:AskForDataName}"
},
"infosetOutputType": {
"type": "string",
"description": "Destination for final Infoset (file | 'console' | 'none')",
"enum": [
"file",
"console",
"none"
],
"default": "none"
},
"infosetOutputFilePath": {
"type": "string",
"description": "Path to output for Infoset file (req: infosetOutput=file)",
"default": "${workspaceFolder}/infoset.xml"
},
"stopOnEntry": {
"type": "boolean",
"description": "Automatically stop after launch.",
"default": true
},
"trace": {
"type": "boolean",
"description": "Enable logging of the Debug Adapter Protocol.",
"default": true
},
"useExistingServer": {
"type": "boolean",
"description": "Enable connection to running DAP Server",
"default": false
},
"debugServer": {
"type": "integer",
"description": "Port debug server running on",
"default": 4711
},
"openHexView": {
"type": "boolean",
"description": "Open hexview on debug start",
"default": false
},
"openInfosetView": {
"type": "boolean",
"description": "Open hexview on debug start",
"default": false
},
"openInfosetDiffView": {
"type": "boolean",
"description": "Open hexview on debug start",
"default": false
},
"daffodilDebugClasspath": {
"type": "string",
"description": "Additional classpaths to be exported to the debugger",
"default": ""
}
}
}
]
}
}