{ "name": "openhab", "displayName": "openHAB", "description": "Robust tool for openHAB textual configurations. Includes code snippets, syntax highlighting, language server integration and more.", "version": "1.0.0", "publisher": "openhab", "icon": "openhab.png", "repository": { "type": "git", "url": "https://github.com/openhab/openhab-vscode.git" }, "license": "SEE LICENSE IN LICENSE", "engines": { "vscode": "^1.37.0" }, "categories": [ "Programming Languages", "Snippets", "Other" ], "activationEvents": [ "onCommand:openhab.searchCommunity", "onCommand:openhab.openConsole", "onCommand:openhab.basicUI", "onCommand:openhab.command.refreshEntry", "onCommand:openhab.command.copyName", "onCommand:openhab.command.items.copyState", "onCommand:openhab.command.items.addRule", "onCommand:openhab.command.items.addToSitemap", "onCommand:openhab.command.things.docs", "onCommand:openhab.command.things.copyUID", "onCommand:openhab.command.things.addItems", "onLanguage:openhab", "workspaceContains:services/addons.cfg", "workspaceContains:services/runtime.cfg", "workspaceContains:items/*.items", "workspaceContains:sitemaps/*.sitemap", "workspaceContains:things/*.things", "workspaceContains:rules/*.rules", "workspaceContains:transform/*.map", "workspaceContains:transform/*.js", "workspaceContains:automation/jsr223/*" ], "main": "./client/out/extension", "contributes": { "commands": [ { "command": "openhab.basicUI", "category": "openHAB", "title": "Open Basic UI", "icon": { "light": "./images/oh_color.svg", "dark": "./images/oh.svg" } }, { "command": "openhab.command.copyName", "title": "Copy Name" }, { "command": "openhab.command.items.copyState", "title": "Copy State" }, { "command": "openhab.command.items.addRule", "title": "Create a Rule" }, { "command": "openhab.command.items.addToSitemap", "title": "Insert into Sitemap" }, { "command": "openhab.command.refreshEntry", "title": "Refresh", "icon": { "light": "resources/light/refresh.svg", "dark": "resources/dark/refresh.svg" } }, { "command": "openhab.command.things.addItems", "title": "Create Items from Channels", "icon": { "light": "resources/light/arrow_right.svg", "dark": "resources/dark/arrow_right.svg" } }, { "command": "openhab.command.things.copyUID", "title": "Copy UID" }, { "command": "openhab.command.things.docs", "title": "Binding documentation", "icon": { "light": "resources/light/http.svg", "dark": "resources/dark/http.svg" } }, { "command": "openhab.openConsole", "category": "openHAB", "title": "Open openHAB console" }, { "command": "openhab.searchCommunity", "category": "openHAB", "title": "Search in Community Forum" }, { "command": "openhab.updateNotice", "category": "openHAB", "title": "Open the latest update notice" } ], "configuration": { "type": "object", "title": "openHAB", "properties": { "openhab.host": { "type": "string", "default": "openhabianpi", "markdownDeprecationMessage": "**Deprecated**: Please use `#openhab.connection.host#` instead." }, "openhab.karafCommand": { "type": "string", "default": "ssh openhab@%openhabhost% -p 8101", "markdownDescription": "**Deprecated**: Please use `#openhab.consoleCommand#` instead." }, "openhab.password": { "type": "string", "default": "", "markdownDeprecationMessage": "**Deprecated**: Please use `#openhab.connection.basicAuth.password#` instead." }, "openhab.port": { "type": [ "number", "null" ], "default": 8080, "markdownDeprecationMessage": "**Deprecated**: Please use `#openhab.connection.port#` instead." }, "openhab.username": { "type": "string", "default": "", "markdownDeprecationMessage": "**Deprecated**: Please use `#openhab.connection.basicAuth.username#` instead." }, "openhab.remoteLspEnabled": { "type": "boolean", "default": true, "markdownDeprecationMessage": "**Deprecated**: Please use `#openhab.languageserver.remoteLspEnabled#` instead." }, "openhab.remoteLspPort": { "type": [ "number", "null" ], "default": 5007, "markdownDeprecationMessage": "**Deprecated**: Please use `#openhab.languageserver.remoteLspPort#` instead." }, "openhab.sitemapPreviewUI": { "type": [ "string" ], "default": "basicui", "markdownDeprecationMessage": "**Deprecated**: This parameter is deprecated and will be removed with one of the next updates." }, "openhab.connection.authToken": { "type": [ "string", "null" ], "default": null, "markdownDescription": "Specifies the **auth token**, you can generate for your openHAB 3 api access.\n\nSee [Apitoken Documentation](https://openhab.org/docs/configuration/apitokens.html) for further Information!" }, "openhab.connection.host": { "type": [ "string", "null" ], "default": null, "markdownDescription": "Specifies the **url** or **IP address** for your openHAB environment.\n\n(Use 'localhost' when developing locally)" }, "openhab.connection.port": { "type": [ "number", "null" ], "default": null, "markdownDescription": "Specifies the **port** for your openHAB environment." }, "openhab.connection.basicAuth.password": { "type": [ "string", "null" ], "default": null, "markdownDescription": "*OPTIONAL*:\n\nSpecifies the Basic Auth password for accessing the openHAB preview/REST API.\n\nPlease leave this parameter **empty** when you are using an api token in openHAB 3!" }, "openhab.connection.basicAuth.username": { "type": [ "string", "null" ], "default": null, "markdownDescription": "*OPTIONAL*:\n\nSpecifies the Basic Auth username for accessing the openHAB preview/REST API." }, "openhab.languageserver.remoteEnabled": { "type": "boolean", "default": true, "markdownDescription": "Enables communication with Language Server of openHAB instance.\n\nIf you are facing connection problems make sure to connect your config folder through a dedicated network drive." }, "openhab.languageserver.remotePort": { "type": [ "number", "null" ], "default": 5007, "markdownDescription": "Specifies the port where openHAB is running its Language Server." }, "openhab.itemCasing": { "type": "string", "default": "camel", "enum": [ "camel", "snake" ], "markdownDescription": "Choose how the `Create Items from Channels` command generates Item names.\n\nUse `camel` for `CamelCase` or `snake` for `Upper_Snake_Case`.", "markdownEnumDescriptions": [ "Uses the `CamelCase` naming scheme.", "Uses the `Upper_Snake_Case` naming scheme." ] }, "openhab.consoleCommand": { "type": "string", "default": "ssh openhab@%openhabhost% -p 8101", "markdownDescription": "Directly log into openHAB console.\n\n**Note** that this option is available only if you exposed openHAB console." }, "openhab.useRestApi": { "type": "boolean", "default": true, "markdownDescription": "Connects to *openHAB REST API* if set to **true**.\n\nIf not, items tree view and things tree view are **disabled**." } } }, "grammars": [ { "language": "openhab", "scopeName": "source.openhab", "path": "./meta/openhab.tmLanguage.json" } ], "iconThemes": [ { "id": "openhab", "label": "openHAB", "path": "./fileicons/openhab-icon-theme.json" } ], "keybindings": [ { "when": "resourceLangId == openhab", "command": "openhab.basicUI", "key": "ctrl+alt+o", "mac": "cmd+alt+o" } ], "languages": [ { "id": "openhab", "aliases": [ "openHAB" ], "extensions": [ ".rules", ".script", ".items", ".sitemap", ".things", ".persist" ], "configuration": "./meta/language-configuration.json" } ], "menus": { "editor/title": [ { "when": "resourceLangId == openhab", "command": "openhab.basicUI", "group": "navigation" } ], "view/item/context": [ { "command": "openhab.command.copyName", "when": "view == openhabItems" }, { "command": "openhab.command.copyName", "when": "view == openhabThings" }, { "command": "openhab.command.items.addRule", "when": "view == openhabItems" }, { "command": "openhab.command.items.addToSitemap", "when": "view == openhabItems" }, { "command": "openhab.command.items.copyState", "when": "view == openhabItems && viewItem != statelessItem && viewItem != statelessGroup" }, { "command": "openhab.command.things.addItems", "when": "view == openhabThings" }, { "command": "openhab.command.things.addItems", "when": "view == openhabThings", "group": "inline" }, { "command": "openhab.command.things.copyUID", "when": "view == openhabThings" }, { "command": "openhab.command.things.docs", "when": "view == openhabThings && viewItem == thing" }, { "command": "openhab.command.things.docs", "when": "view == openhabThings && viewItem == thing", "group": "inline" } ], "view/title": [ { "command": "openhab.command.refreshEntry", "when": "view == openhabItems", "group": "navigation" }, { "command": "openhab.command.refreshEntry", "when": "view == openhabThings", "group": "navigation" } ] }, "snippets": [ { "language": "openhab", "path": "./snippets/openhab.json" }, { "language": "openhab", "path": "./snippets/openhab_items.json" }, { "language": "openhab", "path": "./snippets/openhab_rules.json" }, { "language": "openhab", "path": "./snippets/openhab_rules_designpattern.json" }, { "language": "openhab", "path": "./snippets/openhab_rules_typeconversions.json" }, { "language": "openhab", "path": "./snippets/openhab_sitemaps.json" } ], "views": { "openhab": [ { "id": "openhabItems", "name": "Items", "when": "config.openhab.useRestApi == true" }, { "id": "openhabThings", "name": "Things", "when": "config.openhab.useRestApi == true" } ] }, "viewsContainers": { "activitybar": [ { "id": "openhab", "title": "openHAB", "icon": "images/oh.svg" } ] } }, "scripts": { "build": "npm run clean:out && npm install && npm run compile && npm run test", "clean:node_modules": "rimraf client/node_modules && rimraf serverJS/node_modules", "clean:out": "rimraf client/out && rimraf serverJS/out", "compile": "tsc -b", "deploy": "vsce publish --yarn", "package": "npm run build && vsce package", "postinstall": "cd client && npm install && cd ../serverJS && npm install && cd ..", "pruneProduction": "cd client && npm prune --production && cd ../serverJS && npm prune --production && cd ..", "publish": "npm run build && vsce publish", "test": "cd client && npm test && cd ../serverJS && npm test && cd ..", "test-compile": "tsc -p ./", "vscode:prepublish": "npm run webpack", "watch": "tsc -b -w", "webpack": "webpack --mode production --config ./client/webpack.config.js && webpack --mode production --config ./serverJS/webpack.config.js", "webpack-dev": "webpack --mode development --config ./client/webpack.config.js && webpack --mode development --config ./serverJS/webpack.config.js" }, "devDependencies": { "@types/form-data": "^2.2.1", "@types/lodash": "^4.14.167", "@types/node": "^8.10.66", "@typescript-eslint/eslint-plugin": "^4.13.0", "@typescript-eslint/parser": "^4.13.0", "eslint": "^7.18.0", "eslint-config-prettier": "^7.1.0", "merge-options": "^1.0.1", "request-promise-native": "^1.0.9", "rimraf": "^3.0.2", "ts-loader": "^6.2.2", "typescript": "^3.9.7", "vsce": "^1.103.1", "webpack": "^5.76.0", "webpack-cli": "^3.3.12" } }