forked from openhab/openhab-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
371 lines (371 loc) · 13.6 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
{
"name": "openhab",
"displayName": "openHAB",
"description": "Robust tool for openHAB textual configurations. Includes code snippets, syntax highlighting, language server integration and more.",
"version": "0.5.1",
"publisher": "openhab",
"icon": "openhab.png",
"repository": {
"type": "git",
"url": "https://github.com/openhab/openhab-vscode.git"
},
"license": "SEE LICENSE IN LICENSE",
"engines": {
"vscode": "^1.30.0"
},
"categories": [
"Programming Languages",
"Snippets",
"Other"
],
"activationEvents": [
"onCommand:openhab.searchCommunity",
"onCommand:openhab.openKaraf",
"onCommand:openhab.basicUI",
"onCommand:openhab.command.refreshEntry",
"onCommand:openhab.command.showInPaperUI",
"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: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": {
"menus": {
"editor/title": [
{
"when": "resourceLangId == openhab",
"command": "openhab.basicUI",
"group": "navigation"
}
],
"view/title": [
{
"command": "openhab.command.refreshEntry",
"when": "view == openhabItems",
"group": "navigation"
},
{
"command": "openhab.command.refreshEntry",
"when": "view == openhabThings",
"group": "navigation"
}
],
"view/item/context": [
{
"command": "openhab.command.showInPaperUI",
"when": "view == openhabItems"
},
{
"command": "openhab.command.showInPaperUI",
"when": "view == openhabThings && viewItem == thing"
},
{
"command": "openhab.command.copyName",
"when": "view == openhabItems"
},
{
"command": "openhab.command.copyName",
"when": "view == openhabThings"
},
{
"command": "openhab.command.items.copyState",
"when": "view == openhabItems && viewItem != statelessItem && viewItem != statelessGroup"
},
{
"command": "openhab.command.items.addToSitemap",
"when": "view == openhabItems"
},
{
"command": "openhab.command.things.addItems",
"when": "view == openhabThings"
},
{
"command": "openhab.command.items.addRule",
"when": "view == openhabItems"
},
{
"command": "openhab.command.things.copyUID",
"when": "view == openhabThings"
},
{
"command": "openhab.command.things.docs",
"when": "view == openhabThings && viewItem == thing"
}
]
},
"keybindings": [
{
"when": "resourceLangId == openhab",
"command": "openhab.basicUI",
"key": "ctrl+alt+o",
"mac": "cmd+alt+o"
}
],
"commands": [
{
"command": "openhab.searchCommunity",
"title": "openHAB: Search in Community Forum"
},
{
"command": "openhab.openKaraf",
"title": "openHAB: Open Karaf console"
},
{
"command": "openhab.command.showInPaperUI",
"title": "Show in Paper UI"
},
{
"command": "openhab.command.items.addRule",
"title": "Create a Rule"
},
{
"command": "openhab.command.items.addToSitemap",
"title": "Insert into Sitemap"
},
{
"command": "openhab.command.copyName",
"title": "Copy Name"
},
{
"command": "openhab.command.items.copyState",
"title": "Copy State"
},
{
"command": "openhab.command.things.copyUID",
"title": "Copy UID"
},
{
"command": "openhab.command.things.addItems",
"title": "Create Items from Channels"
},
{
"command": "openhab.command.things.docs",
"title": "Binding documentation"
},
{
"command": "openhab.command.refreshEntry",
"title": "Refresh",
"icon": {
"light": "resources/light/refresh.svg",
"dark": "resources/dark/refresh.svg"
}
},
{
"command": "openhab.basicUI",
"title": "openHAB: Open Basic UI",
"icon": {
"light": "./images/oh_color.svg",
"dark": "./images/oh.svg"
}
}
],
"configuration": {
"type": "object",
"title": "openHAB Configuration",
"properties": {
"openhab.useRestApi": {
"type": "boolean",
"default": true,
"description": "Connects to openHAB REST API if set to true. If not, Items tree view and things tree view are disabled."
},
"openhab.host": {
"type": [
"string"
],
"default": "openhabianpi",
"description": "Specifies the URL or IP address for the openHAB preview. (Use 'localhost' when developing locally)"
},
"openhab.port": {
"type": [
"number",
"null"
],
"default": 8080,
"description": "Specifies the port for the openHAB preview."
},
"openhab.remoteLspPort": {
"type": [
"number",
"null"
],
"default": 5007,
"description": "Specifies the port where openHAB is running its Language Server."
},
"openhab.remoteLspEnabled": {
"type": [
"boolean"
],
"default": true,
"description": "Enables communication with Language Server of openHAB instance.\nIf you are facing connection problems make sure to connect your config folder through a dedicated network drive."
},
"openhab.username": {
"type": [
"string"
],
"default": "",
"description": "(optional) Specifies the Basic Auth username for accessing the openHAB preview/REST API"
},
"openhab.password": {
"type": [
"string"
],
"default": "",
"description": "(optional) Specifies the Basic Auth password for accessing the openHAB preview/REST API"
},
"openhab.paperPath": {
"type": [
"string"
],
"default": "paperui",
"description": "(optional) If you're using openHAB2 build from before 9th Jan 2017, change this parameter to 'ui'"
},
"openhab.karafCommand": {
"type": [
"string"
],
"default": "ssh openhab@%openhabhost% -p 8101",
"description": "Directly log into openHAB Karaf console. Note that this option is available only if you exposed Karaf console."
},
"openhab.sitemapPreviewUI": {
"type": [
"string"
],
"default": "basicui",
"description": "(optional) Choose between `basicui` and `classicui` for the sitemap preview panel"
},
"openhab.itemCasing": {
"type": "string",
"default": "camel",
"enum": [
"camel",
"snake"
],
"markdownDescription": "Choose how the `Create Items from Channels` command generates Item names. Use `camel` for `CamelCase` or `snake` for `Upper_Snake_Case`."
}
}
},
"languages": [
{
"id": "openhab",
"aliases": [
"openHAB"
],
"extensions": [
".rules",
".script",
".items",
".sitemap",
".things",
".persist"
],
"configuration": "./meta/language-configuration.json"
}
],
"grammars": [
{
"language": "openhab",
"scopeName": "source.openhab",
"path": "./meta/openhab.tmLanguage.json"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "openhab",
"title": "openHAB",
"icon": "images/oh.svg"
}
]
},
"views": {
"openhab": [
{
"id": "openhabItems",
"name": "Items",
"when": "config.openhab.useRestApi == true"
},
{
"id": "openhabThings",
"name": "Things",
"when": "config.openhab.useRestApi == true"
}
]
},
"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"
}
],
"iconThemes": [
{
"id": "openhab",
"label": "openHAB",
"path": "./fileicons/openhab-icon-theme.json"
}
]
},
"scripts": {
"compile": "tsc -b",
"watch": "tsc -b -w",
"postinstall": "cd client && npm install && cd ../serverJS && npm install && cd ..",
"test": "cd client && npm test && cd ../serverJS && npm test && cd ..",
"clean:node_modules": "rimraf client/node_modules && rimraf serverJS/node_modules",
"clean:out": "rimraf client/out && rimraf serverJS/out",
"pruneProduction": "cd client && npm prune --production && cd ../serverJS && npm prune --production && cd ..",
"build": "npm run clean:out && npm install && npm run compile && npm run test",
"package": "npm run build && vsce package",
"publish": "npm run build && vsce publish",
"vscode:prepublish": "npm run webpack",
"webpack": "webpack --mode production --config ./client/webpack.config.js && webpack --mode production --config ./serverJS/webpack.config.js",
"webpack-dev": "webpack --mode none --config ./client/webpack.config.js && webpack --mode none --config ./serverJS/webpack.config.js",
"test-compile": "tsc -p ./"
},
"devDependencies": {
"@types/form-data": "^2.2.1",
"@types/lodash": "^4.14.119",
"@types/node": "^8.10.0",
"@types/request": "^2.48.1",
"@types/request-promise-native": "^1.0.15",
"jest": "^23.6.0",
"merge-options": "^1.0.1",
"request-promise-native": "^1.0.5",
"rimraf": "^3.0.0",
"ts-loader": "^6.2.1",
"typescript": "^3.2.2",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.9"
}
}