{ "name": "vscode-basex", "displayName": "BaseX tools", "description": "BaseX tools: XQuery, XML, XPath Tools for Visual Studio Code", "version": "0.1.0", "preview": true, "publisher": "quodatum", "author": "Andy Bunce (https://github.com/Quodatum)", "license": "MIT", "galleryBanner": { "color": "#FFFFFF", "theme": "light" }, "icon": "resources/basex.png", "homepage": "https://github.com/Quodatum/vscode-basex", "repository": { "type": "git", "url": "git+https://github.com/Quodatum/vscode-basex.git" }, "bugs": { "url": "https://github.com/Quodatum/vscode-basex/issues" }, "engines": { "vscode": "^1.73.0" }, "categories": [ "Formatters", "Programming Languages", "Linters", "Snippets", "Other" ], "activationEvents": [ "onCommand:basexTools.evaluateXPath", "onCommand:basexTools.executeXQuery", "onCommand:basexTools.formatAsXml", "onCommand:basexTools.textToXml", "onCommand:basexTools.xmlToText", "onCommand:basexTools.minifyXml", "onCommand:basexTools.xqLintReport", "onLanguage:xml", "onLanguage:xquery", "onLanguage:xsl" ], "main": "./out/extension.js", "contributes": { "commands": [ { "command": "basexTools.evaluateXPath", "title": "BaseX Tools: Evaluate XPath" }, { "command": "basexTools.executeXQuery", "title": "BaseX Tools: Execute XQuery" }, { "command": "basexTools.formatAsXml", "title": "BaseX Tools: Format as XML" }, { "command": "basexTools.textToXml", "title": "BaseX Tools: Convert text to XML (<> -> <>)" }, { "command": "basexTools.xmlToText", "title": "BaseX Tools: Convert XML to text (<> -> <>)" }, { "command": "basexTools.getCurrentXPath", "title": "BaseX Tools: Get Current XPath" }, { "command": "basexTools.minifyXml", "title": "BaseX Tools: Minify XML" }, { "command": "basexTools.xqLintReport", "title": "BaseX Tools: Analysis of current location in Xquery source" } ], "configuration": [ { "id": "xmltree", "title": "XML tree view ", "properties": { "basexTools.xmlTree.enableTreeView": { "type": "boolean", "default": false, "description": "Enables the XML Document view in the explorer for XML documents.", "scope": "window" }, "basexTools.xmlTree.enableViewMetadata": { "type": "boolean", "default": true, "description": "Enables attribute and child element counts in the XML Document view.", "scope": "window" }, "basexTools.xmlTree.enableViewCursorSync": { "type": "boolean", "default": false, "description": "Enables auto-reveal of elements in the XML Document view when a start tag is clicked in the editor.", "scope": "window" } } }, { "id": "xpath", "title": "XPath ", "properties": { "basexTools.xpath.ignoreDefaultNamespace": { "type": "boolean", "default": true, "description": "Ignore default xmlns attributes when evaluating XPath.", "scope": "window" }, "basexTools.xpath.persistXPathQuery": { "type": "boolean", "default": true, "description": "Remember the last XPath query used.", "scope": "window" } } }, { "id": "xquery", "title": "XQuery ", "properties": { "basexTools.xquery.executionArguments": { "type": "array", "default": [ "-xquery", "$(script)", "-in", "$(input)", "-out", "$(input).output.xml" ], "description": "Arguments to be passed to the XQuery execution engine.", "scope": "window" }, "basexTools.xquery.executionEngine": { "type": "string", "default": "", "description": "The full path to the executable to run when executing XQuery scripts.", "scope": "window" }, "basexTools.xquery.executionInputLimit": { "type": "integer", "default": 100, "description": "The maximum number of input files to enumerate when executing XQuery scripts.", "scope": "window" }, "basexTools.xquery.executionInputSearchPattern": { "type": "string", "default": "**/*.xml", "description": "The pattern used to search for input XML files when executing XQuery scripts.", "scope": "window" } } }, { "title": "BaseX Tools ", "type": "object", "properties": { "basexTools.enforcePrettySelfClosingTagOnFormat": { "type": "boolean", "default": false, "description": "Enforces a space before the forward slash at the end of a self-closing XML tag.", "scope": "resource" }, "basexTools.removeCommentsOnMinify": { "type": "boolean", "default": false, "description": "Remove XML comments during minification.", "scope": "resource" }, "basexTools.splitAttributesOnFormat": { "type": "boolean", "default": false, "description": "Put each attribute on a new line when formatting XML. Overrides `basexTools.splitXmlnsOnFormat` if set to `true`.", "scope": "resource" }, "basexTools.splitXmlnsOnFormat": { "type": "boolean", "default": true, "description": "Put each xmlns attribute on a new line when formatting XML.", "scope": "resource" }, "basexTools.xmlFormatterImplementation": { "type": "string", "enum": [ "classic", "v2" ], "default": "v2", "description": "Supported XML Formatters: classic", "scope": "window" } } } ], "grammars": [ { "language": "xquery", "path": "./languages/xquery/xquery.tmLanguage", "scopeName": "source.xquery" } ], "snippets": [ { "language": "xquery", "path": "./snippets.jsonc" } ], "keybindings": [ { "key": "ctrl+shift+alt+x", "command": "basexTools.evaluateXPath" }, { "key": "ctrl+shift+alt+b", "command": "basexTools.formatAsXml" } ], "languages": [ { "id": "xml", "extensions": [ ".config", ".csproj", ".xml", ".xsd", ".xsl", ".plist", ".mobileconfig", ".sch" ] }, { "id": "xquery", "aliases": [ "XQuery", "xquery" ], "extensions": [ ".xq", ".xql", ".xqm", ".xqy", ".xquery" ], "configuration": "./languages/xquery/xquery.json" } ], "menus": { "commandPalette": [ { "command": "basexTools.evaluateXPath", "when": "editorLangId == xml" }, { "command": "basexTools.executeXQuery", "when": "editorLangId == xquery" }, { "command": "basexTools.getCurrentXPath", "when": "editorLangId == xml" }, { "command": "basexTools.minifyXml", "when": "editorLangId == xml" } ], "editor/context": [ { "command": "basexTools.minifyXml", "group": "1_modification@100", "when": "editorLangId == 'xml'" } ] }, "views": { "explorer": [ { "id": "xmlTreeView", "name": "XML Document", "when": "xmlTreeViewEnabled" } ] } }, "scripts": { "vscode:prepublish": "npm run esbuild-base -- --minify", "esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node", "esbuild": "npm run esbuild-base -- --sourcemap", "esbuild-watch": "npm run esbuild-base -- --sourcemap --watch", "test-compile": "tsc -p ./", "compile": "tsc -p ./", "watch": "tsc -watch -p ./", "pretest": "npm run compile && npm run lint", "lint": "eslint src --ext ts", "test": "node ./out/test/runTest.js" }, "devDependencies": { "@types/glob": "^7.2.0", "@types/mocha": "^9.0.0", "@types/node": "^14.18.12", "@types/vscode": "^1.73.0", "@types/xmldom": "^0.1.31", "@typescript-eslint/eslint-plugin": "^5.13.0", "@typescript-eslint/parser": "^5.13.0", "@vscode/test-electron": "^2.1.3", "esbuild": "^0.14.25", "eslint": "^8.10.0", "glob": "^7.2.0", "mocha": "^9.2.1", "typescript": "^4.7.3" }, "dependencies": { "@quodatum/xqlint": "^0.2.0", "@xmldom/xmldom": "^0.8.1", "xpath": "0.0.32" } }