aboutsummaryrefslogtreecommitdiff
path: root/editors/code
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/.prettierignore2
-rw-r--r--editors/code/.vscode/launch.json31
-rw-r--r--editors/code/.vscode/settings.json11
-rw-r--r--editors/code/.vscode/tasks.json20
-rw-r--r--editors/code/.vscodeignore13
-rw-r--r--editors/code/package-lock.json1127
-rw-r--r--editors/code/package.json317
-rw-r--r--editors/code/rollup.config.js29
-rw-r--r--editors/code/src/client.ts90
-rw-r--r--editors/code/src/color_theme.ts123
-rw-r--r--editors/code/src/commands/analyzer_status.ts74
-rw-r--r--editors/code/src/commands/cargo_watch.ts264
-rw-r--r--editors/code/src/commands/expand_macro.ts103
-rw-r--r--editors/code/src/commands/index.ts66
-rw-r--r--editors/code/src/commands/inlay_hints.ts115
-rw-r--r--editors/code/src/commands/join_lines.ts46
-rw-r--r--editors/code/src/commands/line_buffer.ts16
-rw-r--r--editors/code/src/commands/matching_brace.ts58
-rw-r--r--editors/code/src/commands/on_enter.ts53
-rw-r--r--editors/code/src/commands/parent_module.ts55
-rw-r--r--editors/code/src/commands/runnables.ts214
-rw-r--r--editors/code/src/commands/syntaxTree.ts76
-rw-r--r--editors/code/src/commands/syntax_tree.ts104
-rw-r--r--editors/code/src/commands/watch_status.ts63
-rw-r--r--editors/code/src/config.ts87
-rw-r--r--editors/code/src/ctx.ts112
-rw-r--r--editors/code/src/events/change_active_text_editor.ts32
-rw-r--r--editors/code/src/events/change_text_document.ts24
-rw-r--r--editors/code/src/events/index.ts4
-rw-r--r--editors/code/src/extension.ts218
-rw-r--r--editors/code/src/highlighting.ts209
-rw-r--r--editors/code/src/inlay_hints.ts120
-rw-r--r--editors/code/src/main.ts51
-rw-r--r--editors/code/src/notifications/index.ts3
-rw-r--r--editors/code/src/notifications/publish_decorations.ts24
-rw-r--r--editors/code/src/server.ts109
-rw-r--r--editors/code/src/source_change.ts (renamed from editors/code/src/commands/apply_source_change.ts)13
-rw-r--r--editors/code/src/status_display.ts115
-rw-r--r--editors/code/src/test/fixtures/rust-diagnostics/clippy/trivially_copy_pass_by_ref.json110
-rw-r--r--editors/code/src/test/fixtures/rust-diagnostics/error/E0053.json42
-rw-r--r--editors/code/src/test/fixtures/rust-diagnostics/error/E0061.json114
-rw-r--r--editors/code/src/test/fixtures/rust-diagnostics/error/E0277.json261
-rw-r--r--editors/code/src/test/fixtures/rust-diagnostics/error/E0308.json33
-rw-r--r--editors/code/src/test/fixtures/rust-diagnostics/warning/unused_variables.json72
-rw-r--r--editors/code/src/test/runTest.ts22
-rw-r--r--editors/code/src/test/utils/diagnotics/SuggestedFix.test.ts134
-rw-r--r--editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts127
-rw-r--r--editors/code/src/test/utils/diagnotics/rust.test.ts236
-rw-r--r--editors/code/src/test/utils/diagnotics/vscode.test.ts98
-rw-r--r--editors/code/src/test/utils/index.ts49
-rw-r--r--editors/code/src/utils/diagnostics/SuggestedFix.ts67
-rw-r--r--editors/code/src/utils/diagnostics/SuggestedFixCollection.ts77
-rw-r--r--editors/code/src/utils/diagnostics/rust.ts299
-rw-r--r--editors/code/src/utils/diagnostics/vscode.ts14
-rw-r--r--editors/code/src/utils/processes.ts51
-rw-r--r--editors/code/src/utils/terminateProcess.sh12
-rw-r--r--editors/code/tsconfig.json11
-rw-r--r--editors/code/tslint.json15
58 files changed, 1418 insertions, 4617 deletions
diff --git a/editors/code/.prettierignore b/editors/code/.prettierignore
deleted file mode 100644
index 3798f2d1f..000000000
--- a/editors/code/.prettierignore
+++ /dev/null
@@ -1,2 +0,0 @@
1node_modules/
2.vscode-test/
diff --git a/editors/code/.vscode/launch.json b/editors/code/.vscode/launch.json
deleted file mode 100644
index c3578f476..000000000
--- a/editors/code/.vscode/launch.json
+++ /dev/null
@@ -1,31 +0,0 @@
1// A launch configuration that compiles the extension and then opens it inside a new window
2// Use IntelliSense to learn about possible attributes.
3// Hover to view descriptions of existing attributes.
4// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5{
6 "version": "0.2.0",
7 "configurations": [
8 {
9 "name": "Extension",
10 "type": "extensionHost",
11 "request": "launch",
12 "runtimeExecutable": "${execPath}",
13 "args": ["--extensionDevelopmentPath=${workspaceFolder}"],
14 "outFiles": ["${workspaceFolder}/out/**/*.js"],
15 "preLaunchTask": "npm: watch"
16 },
17 {
18 "name": "Extension Tests",
19 "type": "extensionHost",
20 "request": "launch",
21 "runtimeExecutable": "${execPath}",
22 "args": [
23 "${workspaceFolder}/src/test/",
24 "--extensionDevelopmentPath=${workspaceFolder}",
25 "--extensionTestsPath=${workspaceFolder}/out/test"
26 ],
27 "outFiles": ["${workspaceFolder}/out/test/**/*.js"],
28 "preLaunchTask": "npm: watch"
29 }
30 ]
31}
diff --git a/editors/code/.vscode/settings.json b/editors/code/.vscode/settings.json
deleted file mode 100644
index fa0a10487..000000000
--- a/editors/code/.vscode/settings.json
+++ /dev/null
@@ -1,11 +0,0 @@
1// Place your settings in this file to overwrite default and user settings.
2{
3 "files.exclude": {
4 "out": false // set this to true to hide the "out" folder with the compiled JS files
5 },
6 "search.exclude": {
7 "out": true // set this to false to include "out" folder in search results
8 },
9 // Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10 "typescript.tsc.autoDetect": "off"
11}
diff --git a/editors/code/.vscode/tasks.json b/editors/code/.vscode/tasks.json
deleted file mode 100644
index 5deb2bccd..000000000
--- a/editors/code/.vscode/tasks.json
+++ /dev/null
@@ -1,20 +0,0 @@
1// See https://go.microsoft.com/fwlink/?LinkId=733558
2// for the documentation about the tasks.json format
3{
4 "version": "2.0.0",
5 "tasks": [
6 {
7 "type": "npm",
8 "script": "watch",
9 "problemMatcher": "$tsc-watch",
10 "isBackground": true,
11 "presentation": {
12 "reveal": "never"
13 },
14 "group": {
15 "kind": "build",
16 "isDefault": true
17 }
18 }
19 ]
20}
diff --git a/editors/code/.vscodeignore b/editors/code/.vscodeignore
index f9e72b668..9bcd28e61 100644
--- a/editors/code/.vscodeignore
+++ b/editors/code/.vscodeignore
@@ -1,9 +1,4 @@
1.vscode/** 1**
2.vscode-test/** 2!out/main.js
3out/** 3!package.json
4src/** 4!package-lock.json
5.gitignore
6tsconfig.json
7vsc-extension-quickstart.md
8tslint.json
9node_modules/**
diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json
index 4c5c13646..adb01760a 100644
--- a/editors/code/package-lock.json
+++ b/editors/code/package-lock.json
@@ -24,45 +24,61 @@
24 "js-tokens": "^4.0.0" 24 "js-tokens": "^4.0.0"
25 } 25 }
26 }, 26 },
27 "@types/estree": { 27 "@rollup/plugin-commonjs": {
28 "version": "0.0.39", 28 "version": "11.0.0",
29 "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", 29 "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.0.0.tgz",
30 "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", 30 "integrity": "sha512-jnm//T5ZWOZ6zmJ61fReSCBOif+Ax8dHVoVggA+d2NA7T4qCWgQ3KYr+zN2faGEYLpe1wa03IzvhR+sqVLxUWg==",
31 "dev": true 31 "dev": true,
32 "requires": {
33 "@rollup/pluginutils": "^3.0.0",
34 "estree-walker": "^0.6.1",
35 "is-reference": "^1.1.2",
36 "magic-string": "^0.25.2",
37 "resolve": "^1.11.0"
38 }
32 }, 39 },
33 "@types/events": { 40 "@rollup/plugin-node-resolve": {
34 "version": "3.0.0", 41 "version": "6.0.0",
35 "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", 42 "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-6.0.0.tgz",
36 "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", 43 "integrity": "sha512-GqWz1CfXOsqpeVMcoM315+O7zMxpRsmhWyhJoxLFHVSp9S64/u02i7len/FnbTNbmgYs+sZyilasijH8UiuboQ==",
37 "dev": true 44 "dev": true,
45 "requires": {
46 "@rollup/pluginutils": "^3.0.0",
47 "@types/resolve": "0.0.8",
48 "builtin-modules": "^3.1.0",
49 "is-module": "^1.0.0",
50 "resolve": "^1.11.1"
51 }
38 }, 52 },
39 "@types/glob": { 53 "@rollup/plugin-typescript": {
40 "version": "7.1.1", 54 "version": "2.0.1",
41 "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", 55 "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-2.0.1.tgz",
42 "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", 56 "integrity": "sha512-UA/bN/DlHN19xdOllXmp7G7pM2ac9dQMg0q2T1rg4Bogzb7oHXj2WGafpiNpEm54PivcJdzGRJvRnI6zCISW3w==",
43 "dev": true, 57 "dev": true,
44 "requires": { 58 "requires": {
45 "@types/events": "*", 59 "@rollup/pluginutils": "^3.0.0",
46 "@types/minimatch": "*", 60 "resolve": "^1.12.2"
47 "@types/node": "*"
48 } 61 }
49 }, 62 },
50 "@types/minimatch": { 63 "@rollup/pluginutils": {
51 "version": "3.0.3", 64 "version": "3.0.1",
52 "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", 65 "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.1.tgz",
53 "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", 66 "integrity": "sha512-PmNurkecagFimv7ZdKCVOfQuqKDPkrcpLFxRBcQ00LYr4HAjJwhCFxBiY2Xoletll2htTIiXBg6g0Yg21h2M3w==",
54 "dev": true 67 "dev": true,
68 "requires": {
69 "estree-walker": "^0.6.1"
70 }
55 }, 71 },
56 "@types/mocha": { 72 "@types/estree": {
57 "version": "5.2.7", 73 "version": "0.0.41",
58 "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", 74 "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.41.tgz",
59 "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", 75 "integrity": "sha512-rIAmXyJlqw4KEBO7+u9gxZZSQHaCNnIzYrnNmYVpgfJhxTqO0brCX0SYpqUTkVI5mwwUwzmtspLBGBKroMeynA==",
60 "dev": true 76 "dev": true
61 }, 77 },
62 "@types/node": { 78 "@types/node": {
63 "version": "12.12.21", 79 "version": "12.12.22",
64 "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.21.tgz", 80 "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.22.tgz",
65 "integrity": "sha512-8sRGhbpU+ck1n0PGAUgVrWrWdjSW2aqNeyC15W88GRsMpSwzv6RJGlLhE7s2RhVSOdyDmxbqlWSeThq4/7xqlA==", 81 "integrity": "sha512-r5i93jqbPWGXYXxianGATOxTelkp6ih/U0WVnvaqAvTqM+0U6J3kw6Xk6uq/dWNRkEVw/0SLcO5ORXbVNz4FMQ==",
66 "dev": true 82 "dev": true
67 }, 83 },
68 "@types/resolve": { 84 "@types/resolve": {
@@ -92,27 +108,6 @@
92 "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", 108 "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==",
93 "dev": true 109 "dev": true
94 }, 110 },
95 "agent-base": {
96 "version": "4.3.0",
97 "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz",
98 "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==",
99 "dev": true,
100 "requires": {
101 "es6-promisify": "^5.0.0"
102 }
103 },
104 "ansi-colors": {
105 "version": "3.2.3",
106 "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
107 "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==",
108 "dev": true
109 },
110 "ansi-regex": {
111 "version": "3.0.0",
112 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
113 "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
114 "dev": true
115 },
116 "ansi-styles": { 111 "ansi-styles": {
117 "version": "3.2.1", 112 "version": "3.2.1",
118 "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 113 "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
@@ -131,12 +126,6 @@
131 "sprintf-js": "~1.0.2" 126 "sprintf-js": "~1.0.2"
132 } 127 }
133 }, 128 },
134 "atob": {
135 "version": "2.1.2",
136 "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
137 "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
138 "dev": true
139 },
140 "azure-devops-node-api": { 129 "azure-devops-node-api": {
141 "version": "7.2.0", 130 "version": "7.2.0",
142 "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-7.2.0.tgz", 131 "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-7.2.0.tgz",
@@ -171,12 +160,6 @@
171 "concat-map": "0.0.1" 160 "concat-map": "0.0.1"
172 } 161 }
173 }, 162 },
174 "browser-stdout": {
175 "version": "1.3.1",
176 "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
177 "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
178 "dev": true
179 },
180 "buffer-crc32": { 163 "buffer-crc32": {
181 "version": "0.2.13", 164 "version": "0.2.13",
182 "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", 165 "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
@@ -184,15 +167,9 @@
184 "dev": true 167 "dev": true
185 }, 168 },
186 "builtin-modules": { 169 "builtin-modules": {
187 "version": "1.1.1", 170 "version": "3.1.0",
188 "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", 171 "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz",
189 "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", 172 "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==",
190 "dev": true
191 },
192 "camelcase": {
193 "version": "5.3.1",
194 "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
195 "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
196 "dev": true 173 "dev": true
197 }, 174 },
198 "chalk": { 175 "chalk": {
@@ -204,17 +181,6 @@
204 "ansi-styles": "^3.2.1", 181 "ansi-styles": "^3.2.1",
205 "escape-string-regexp": "^1.0.5", 182 "escape-string-regexp": "^1.0.5",
206 "supports-color": "^5.3.0" 183 "supports-color": "^5.3.0"
207 },
208 "dependencies": {
209 "supports-color": {
210 "version": "5.5.0",
211 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
212 "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
213 "dev": true,
214 "requires": {
215 "has-flag": "^3.0.0"
216 }
217 }
218 } 184 }
219 }, 185 },
220 "cheerio": { 186 "cheerio": {
@@ -231,45 +197,6 @@
231 "parse5": "^3.0.1" 197 "parse5": "^3.0.1"
232 } 198 }
233 }, 199 },
234 "cliui": {
235 "version": "5.0.0",
236 "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
237 "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
238 "dev": true,
239 "requires": {
240 "string-width": "^3.1.0",
241 "strip-ansi": "^5.2.0",
242 "wrap-ansi": "^5.1.0"
243 },
244 "dependencies": {
245 "ansi-regex": {
246 "version": "4.1.0",
247 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
248 "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
249 "dev": true
250 },
251 "string-width": {
252 "version": "3.1.0",
253 "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
254 "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
255 "dev": true,
256 "requires": {
257 "emoji-regex": "^7.0.1",
258 "is-fullwidth-code-point": "^2.0.0",
259 "strip-ansi": "^5.1.0"
260 }
261 },
262 "strip-ansi": {
263 "version": "5.2.0",
264 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
265 "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
266 "dev": true,
267 "requires": {
268 "ansi-regex": "^4.1.0"
269 }
270 }
271 }
272 },
273 "color-convert": { 200 "color-convert": {
274 "version": "1.9.3", 201 "version": "1.9.3",
275 "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 202 "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@@ -291,6 +218,12 @@
291 "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", 218 "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
292 "dev": true 219 "dev": true
293 }, 220 },
221 "commandpost": {
222 "version": "1.4.0",
223 "resolved": "https://registry.npmjs.org/commandpost/-/commandpost-1.4.0.tgz",
224 "integrity": "sha512-aE2Y4MTFJ870NuB/+2z1cXBhSBBzRydVVjzhFC4gtenEhpnj15yu0qptWGJsO9YGrcPZ3ezX8AWb1VA391MKpQ==",
225 "dev": true
226 },
294 "concat-map": { 227 "concat-map": {
295 "version": "0.0.1", 228 "version": "0.0.1",
296 "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 229 "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
@@ -315,36 +248,6 @@
315 "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", 248 "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==",
316 "dev": true 249 "dev": true
317 }, 250 },
318 "debug": {
319 "version": "3.2.6",
320 "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
321 "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
322 "dev": true,
323 "requires": {
324 "ms": "^2.1.1"
325 }
326 },
327 "decamelize": {
328 "version": "1.2.0",
329 "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
330 "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
331 "dev": true
332 },
333 "decode-uri-component": {
334 "version": "0.2.0",
335 "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
336 "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
337 "dev": true
338 },
339 "define-properties": {
340 "version": "1.1.3",
341 "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
342 "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
343 "dev": true,
344 "requires": {
345 "object-keys": "^1.0.12"
346 }
347 },
348 "denodeify": { 251 "denodeify": {
349 "version": "1.2.1", 252 "version": "1.2.1",
350 "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz", 253 "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz",
@@ -358,9 +261,9 @@
358 "dev": true 261 "dev": true
359 }, 262 },
360 "diff": { 263 "diff": {
361 "version": "3.5.0", 264 "version": "4.0.1",
362 "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", 265 "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz",
363 "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", 266 "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==",
364 "dev": true 267 "dev": true
365 }, 268 },
366 "dom-serializer": { 269 "dom-serializer": {
@@ -398,11 +301,25 @@
398 "domelementtype": "1" 301 "domelementtype": "1"
399 } 302 }
400 }, 303 },
401 "emoji-regex": { 304 "editorconfig": {
402 "version": "7.0.3", 305 "version": "0.15.3",
403 "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", 306 "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz",
404 "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", 307 "integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==",
405 "dev": true 308 "dev": true,
309 "requires": {
310 "commander": "^2.19.0",
311 "lru-cache": "^4.1.5",
312 "semver": "^5.6.0",
313 "sigmund": "^1.0.1"
314 },
315 "dependencies": {
316 "semver": {
317 "version": "5.7.1",
318 "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
319 "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
320 "dev": true
321 }
322 }
406 }, 323 },
407 "entities": { 324 "entities": {
408 "version": "1.1.2", 325 "version": "1.1.2",
@@ -410,72 +327,12 @@
410 "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", 327 "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
411 "dev": true 328 "dev": true
412 }, 329 },
413 "es-abstract": {
414 "version": "1.16.3",
415 "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.3.tgz",
416 "integrity": "sha512-WtY7Fx5LiOnSYgF5eg/1T+GONaGmpvpPdCpSnYij+U2gDTL0UPfWrhDw7b2IYb+9NQJsYpCA0wOQvZfsd6YwRw==",
417 "dev": true,
418 "requires": {
419 "es-to-primitive": "^1.2.1",
420 "function-bind": "^1.1.1",
421 "has": "^1.0.3",
422 "has-symbols": "^1.0.1",
423 "is-callable": "^1.1.4",
424 "is-regex": "^1.0.4",
425 "object-inspect": "^1.7.0",
426 "object-keys": "^1.1.1",
427 "string.prototype.trimleft": "^2.1.0",
428 "string.prototype.trimright": "^2.1.0"
429 }
430 },
431 "es-to-primitive": {
432 "version": "1.2.1",
433 "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
434 "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
435 "dev": true,
436 "requires": {
437 "is-callable": "^1.1.4",
438 "is-date-object": "^1.0.1",
439 "is-symbol": "^1.0.2"
440 }
441 },
442 "es6-object-assign": {
443 "version": "1.1.0",
444 "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz",
445 "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=",
446 "dev": true
447 },
448 "es6-promise": {
449 "version": "4.2.8",
450 "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz",
451 "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
452 "dev": true
453 },
454 "es6-promisify": {
455 "version": "5.0.0",
456 "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
457 "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
458 "dev": true,
459 "requires": {
460 "es6-promise": "^4.0.3"
461 }
462 },
463 "escape-string-regexp": { 330 "escape-string-regexp": {
464 "version": "1.0.5", 331 "version": "1.0.5",
465 "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 332 "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
466 "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 333 "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
467 "dev": true 334 "dev": true
468 }, 335 },
469 "eslint-plugin-prettier": {
470 "version": "2.7.0",
471 "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.7.0.tgz",
472 "integrity": "sha512-CStQYJgALoQBw3FsBzH0VOVDRnJ/ZimUlpLm226U8qgqYJfPOY/CPK6wyRInMxh73HSKg5wyRwdS4BVYYHwokA==",
473 "dev": true,
474 "requires": {
475 "fast-diff": "^1.1.1",
476 "jest-docblock": "^21.0.0"
477 }
478 },
479 "esprima": { 336 "esprima": {
480 "version": "4.0.1", 337 "version": "4.0.1",
481 "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 338 "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
@@ -494,12 +351,6 @@
494 "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 351 "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
495 "dev": true 352 "dev": true
496 }, 353 },
497 "fast-diff": {
498 "version": "1.2.0",
499 "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz",
500 "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==",
501 "dev": true
502 },
503 "fd-slicer": { 354 "fd-slicer": {
504 "version": "1.1.0", 355 "version": "1.1.0",
505 "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", 356 "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
@@ -509,42 +360,12 @@
509 "pend": "~1.2.0" 360 "pend": "~1.2.0"
510 } 361 }
511 }, 362 },
512 "find-up": {
513 "version": "3.0.0",
514 "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
515 "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
516 "dev": true,
517 "requires": {
518 "locate-path": "^3.0.0"
519 }
520 },
521 "flat": {
522 "version": "4.1.0",
523 "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz",
524 "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==",
525 "dev": true,
526 "requires": {
527 "is-buffer": "~2.0.3"
528 }
529 },
530 "fs.realpath": { 363 "fs.realpath": {
531 "version": "1.0.0", 364 "version": "1.0.0",
532 "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 365 "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
533 "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 366 "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
534 "dev": true 367 "dev": true
535 }, 368 },
536 "function-bind": {
537 "version": "1.1.1",
538 "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
539 "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
540 "dev": true
541 },
542 "get-caller-file": {
543 "version": "2.0.5",
544 "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
545 "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
546 "dev": true
547 },
548 "glob": { 369 "glob": {
549 "version": "7.1.6", 370 "version": "7.1.6",
550 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 371 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
@@ -559,39 +380,12 @@
559 "path-is-absolute": "^1.0.0" 380 "path-is-absolute": "^1.0.0"
560 } 381 }
561 }, 382 },
562 "growl": {
563 "version": "1.10.5",
564 "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
565 "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
566 "dev": true
567 },
568 "has": {
569 "version": "1.0.3",
570 "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
571 "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
572 "dev": true,
573 "requires": {
574 "function-bind": "^1.1.1"
575 }
576 },
577 "has-flag": { 383 "has-flag": {
578 "version": "3.0.0", 384 "version": "3.0.0",
579 "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 385 "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
580 "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 386 "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
581 "dev": true 387 "dev": true
582 }, 388 },
583 "has-symbols": {
584 "version": "1.0.1",
585 "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
586 "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
587 "dev": true
588 },
589 "he": {
590 "version": "1.2.0",
591 "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
592 "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
593 "dev": true
594 },
595 "htmlparser2": { 389 "htmlparser2": {
596 "version": "3.10.1", 390 "version": "3.10.1",
597 "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", 391 "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
@@ -606,43 +400,6 @@
606 "readable-stream": "^3.1.1" 400 "readable-stream": "^3.1.1"
607 } 401 }
608 }, 402 },
609 "http-proxy-agent": {
610 "version": "2.1.0",
611 "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz",
612 "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==",
613 "dev": true,
614 "requires": {
615 "agent-base": "4",
616 "debug": "3.1.0"
617 },
618 "dependencies": {
619 "debug": {
620 "version": "3.1.0",
621 "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
622 "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
623 "dev": true,
624 "requires": {
625 "ms": "2.0.0"
626 }
627 },
628 "ms": {
629 "version": "2.0.0",
630 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
631 "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
632 "dev": true
633 }
634 }
635 },
636 "https-proxy-agent": {
637 "version": "2.2.4",
638 "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz",
639 "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==",
640 "dev": true,
641 "requires": {
642 "agent-base": "^4.3.0",
643 "debug": "^3.1.0"
644 }
645 },
646 "inflight": { 403 "inflight": {
647 "version": "1.0.6", 404 "version": "1.0.6",
648 "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 405 "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@@ -659,36 +416,6 @@
659 "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 416 "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
660 "dev": true 417 "dev": true
661 }, 418 },
662 "interpret": {
663 "version": "1.2.0",
664 "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz",
665 "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==",
666 "dev": true
667 },
668 "is-buffer": {
669 "version": "2.0.4",
670 "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
671 "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
672 "dev": true
673 },
674 "is-callable": {
675 "version": "1.1.4",
676 "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
677 "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
678 "dev": true
679 },
680 "is-date-object": {
681 "version": "1.0.1",
682 "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
683 "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
684 "dev": true
685 },
686 "is-fullwidth-code-point": {
687 "version": "2.0.0",
688 "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
689 "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
690 "dev": true
691 },
692 "is-module": { 419 "is-module": {
693 "version": "1.0.0", 420 "version": "1.0.0",
694 "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", 421 "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
@@ -696,44 +423,22 @@
696 "dev": true 423 "dev": true
697 }, 424 },
698 "is-reference": { 425 "is-reference": {
699 "version": "1.1.3", 426 "version": "1.1.4",
700 "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.3.tgz", 427 "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz",
701 "integrity": "sha512-W1iHHv/oyBb2pPxkBxtaewxa1BC58Pn5J0hogyCdefwUIvb6R+TGbAcIa4qPNYLqLhb3EnOgUf2MQkkF76BcKw==", 428 "integrity": "sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw==",
702 "dev": true, 429 "dev": true,
703 "requires": { 430 "requires": {
704 "@types/estree": "0.0.39" 431 "@types/estree": "0.0.39"
432 },
433 "dependencies": {
434 "@types/estree": {
435 "version": "0.0.39",
436 "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
437 "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
438 "dev": true
439 }
705 } 440 }
706 }, 441 },
707 "is-regex": {
708 "version": "1.0.4",
709 "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
710 "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
711 "dev": true,
712 "requires": {
713 "has": "^1.0.1"
714 }
715 },
716 "is-symbol": {
717 "version": "1.0.3",
718 "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
719 "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
720 "dev": true,
721 "requires": {
722 "has-symbols": "^1.0.1"
723 }
724 },
725 "isexe": {
726 "version": "2.0.0",
727 "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
728 "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
729 "dev": true
730 },
731 "jest-docblock": {
732 "version": "21.2.0",
733 "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.2.0.tgz",
734 "integrity": "sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw==",
735 "dev": true
736 },
737 "js-tokens": { 442 "js-tokens": {
738 "version": "4.0.0", 443 "version": "4.0.0",
739 "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 444 "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -750,11 +455,10 @@
750 "esprima": "^4.0.0" 455 "esprima": "^4.0.0"
751 } 456 }
752 }, 457 },
753 "lines-and-columns": { 458 "jsonc-parser": {
754 "version": "1.1.6", 459 "version": "2.2.0",
755 "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", 460 "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.2.0.tgz",
756 "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", 461 "integrity": "sha512-4fLQxW1j/5fWj6p78vAlAafoCKtuBm6ghv+Ij5W2DrDx0qE+ZdEl2c6Ko1mgJNF5ftX1iEWQQ4Ap7+3GlhjkOA=="
757 "dev": true
758 }, 462 },
759 "linkify-it": { 463 "linkify-it": {
760 "version": "2.2.0", 464 "version": "2.2.0",
@@ -765,40 +469,26 @@
765 "uc.micro": "^1.0.1" 469 "uc.micro": "^1.0.1"
766 } 470 }
767 }, 471 },
768 "locate-path": {
769 "version": "3.0.0",
770 "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
771 "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
772 "dev": true,
773 "requires": {
774 "p-locate": "^3.0.0",
775 "path-exists": "^3.0.0"
776 }
777 },
778 "lodash": { 472 "lodash": {
779 "version": "4.17.15", 473 "version": "4.17.15",
780 "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", 474 "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
781 "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", 475 "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
782 "dev": true 476 "dev": true
783 }, 477 },
784 "log-symbols": { 478 "lru-cache": {
785 "version": "2.2.0", 479 "version": "4.1.5",
786 "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", 480 "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
787 "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", 481 "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
788 "dev": true, 482 "dev": true,
789 "requires": { 483 "requires": {
790 "chalk": "^2.0.1" 484 "pseudomap": "^1.0.2",
485 "yallist": "^2.1.2"
791 } 486 }
792 }, 487 },
793 "lookpath": {
794 "version": "1.0.4",
795 "resolved": "https://registry.npmjs.org/lookpath/-/lookpath-1.0.4.tgz",
796 "integrity": "sha512-xVFrWlfo7n8VZs1YjBWKkbSIJU7DKE/0Mep62KeT94V1Ui1IY9w5fXfgiCsDIDZkakIYSXSeaW2FLbCqfw9/Cw=="
797 },
798 "magic-string": { 488 "magic-string": {
799 "version": "0.25.3", 489 "version": "0.25.4",
800 "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz", 490 "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.4.tgz",
801 "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==", 491 "integrity": "sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw==",
802 "dev": true, 492 "dev": true,
803 "requires": { 493 "requires": {
804 "sourcemap-codec": "^1.4.4" 494 "sourcemap-codec": "^1.4.4"
@@ -853,75 +543,12 @@
853 "minimist": "0.0.8" 543 "minimist": "0.0.8"
854 } 544 }
855 }, 545 },
856 "mocha": {
857 "version": "6.2.2",
858 "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.2.tgz",
859 "integrity": "sha512-FgDS9Re79yU1xz5d+C4rv1G7QagNGHZ+iXF81hO8zY35YZZcLEsJVfFolfsqKFWunATEvNzMK0r/CwWd/szO9A==",
860 "dev": true,
861 "requires": {
862 "ansi-colors": "3.2.3",
863 "browser-stdout": "1.3.1",
864 "debug": "3.2.6",
865 "diff": "3.5.0",
866 "escape-string-regexp": "1.0.5",
867 "find-up": "3.0.0",
868 "glob": "7.1.3",
869 "growl": "1.10.5",
870 "he": "1.2.0",
871 "js-yaml": "3.13.1",
872 "log-symbols": "2.2.0",
873 "minimatch": "3.0.4",
874 "mkdirp": "0.5.1",
875 "ms": "2.1.1",
876 "node-environment-flags": "1.0.5",
877 "object.assign": "4.1.0",
878 "strip-json-comments": "2.0.1",
879 "supports-color": "6.0.0",
880 "which": "1.3.1",
881 "wide-align": "1.1.3",
882 "yargs": "13.3.0",
883 "yargs-parser": "13.1.1",
884 "yargs-unparser": "1.6.0"
885 },
886 "dependencies": {
887 "glob": {
888 "version": "7.1.3",
889 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
890 "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
891 "dev": true,
892 "requires": {
893 "fs.realpath": "^1.0.0",
894 "inflight": "^1.0.4",
895 "inherits": "2",
896 "minimatch": "^3.0.4",
897 "once": "^1.3.0",
898 "path-is-absolute": "^1.0.0"
899 }
900 }
901 }
902 },
903 "ms": {
904 "version": "2.1.1",
905 "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
906 "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
907 "dev": true
908 },
909 "mute-stream": { 546 "mute-stream": {
910 "version": "0.0.8", 547 "version": "0.0.8",
911 "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", 548 "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
912 "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", 549 "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
913 "dev": true 550 "dev": true
914 }, 551 },
915 "node-environment-flags": {
916 "version": "1.0.5",
917 "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz",
918 "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==",
919 "dev": true,
920 "requires": {
921 "object.getownpropertydescriptors": "^2.0.3",
922 "semver": "^5.7.0"
923 }
924 },
925 "nth-check": { 552 "nth-check": {
926 "version": "1.0.2", 553 "version": "1.0.2",
927 "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", 554 "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz",
@@ -931,40 +558,6 @@
931 "boolbase": "~1.0.0" 558 "boolbase": "~1.0.0"
932 } 559 }
933 }, 560 },
934 "object-inspect": {
935 "version": "1.7.0",
936 "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
937 "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==",
938 "dev": true
939 },
940 "object-keys": {
941 "version": "1.1.1",
942 "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
943 "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
944 "dev": true
945 },
946 "object.assign": {
947 "version": "4.1.0",
948 "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
949 "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
950 "dev": true,
951 "requires": {
952 "define-properties": "^1.1.2",
953 "function-bind": "^1.1.1",
954 "has-symbols": "^1.0.0",
955 "object-keys": "^1.0.11"
956 }
957 },
958 "object.getownpropertydescriptors": {
959 "version": "2.0.3",
960 "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz",
961 "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=",
962 "dev": true,
963 "requires": {
964 "define-properties": "^1.1.2",
965 "es-abstract": "^1.5.1"
966 }
967 },
968 "once": { 561 "once": {
969 "version": "1.4.0", 562 "version": "1.4.0",
970 "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 563 "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -1002,30 +595,6 @@
1002 "os-tmpdir": "^1.0.0" 595 "os-tmpdir": "^1.0.0"
1003 } 596 }
1004 }, 597 },
1005 "p-limit": {
1006 "version": "2.2.1",
1007 "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz",
1008 "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==",
1009 "dev": true,
1010 "requires": {
1011 "p-try": "^2.0.0"
1012 }
1013 },
1014 "p-locate": {
1015 "version": "3.0.0",
1016 "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
1017 "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
1018 "dev": true,
1019 "requires": {
1020 "p-limit": "^2.0.0"
1021 }
1022 },
1023 "p-try": {
1024 "version": "2.2.0",
1025 "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
1026 "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
1027 "dev": true
1028 },
1029 "parse-semver": { 598 "parse-semver": {
1030 "version": "1.1.1", 599 "version": "1.1.1",
1031 "resolved": "https://registry.npmjs.org/parse-semver/-/parse-semver-1.1.1.tgz", 600 "resolved": "https://registry.npmjs.org/parse-semver/-/parse-semver-1.1.1.tgz",
@@ -1033,6 +602,14 @@
1033 "dev": true, 602 "dev": true,
1034 "requires": { 603 "requires": {
1035 "semver": "^5.1.0" 604 "semver": "^5.1.0"
605 },
606 "dependencies": {
607 "semver": {
608 "version": "5.7.1",
609 "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
610 "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
611 "dev": true
612 }
1036 } 613 }
1037 }, 614 },
1038 "parse5": { 615 "parse5": {
@@ -1044,12 +621,6 @@
1044 "@types/node": "*" 621 "@types/node": "*"
1045 } 622 }
1046 }, 623 },
1047 "path-exists": {
1048 "version": "3.0.0",
1049 "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
1050 "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
1051 "dev": true
1052 },
1053 "path-is-absolute": { 624 "path-is-absolute": {
1054 "version": "1.0.1", 625 "version": "1.0.1",
1055 "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 626 "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
@@ -1068,10 +639,10 @@
1068 "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", 639 "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=",
1069 "dev": true 640 "dev": true
1070 }, 641 },
1071 "prettier": { 642 "pseudomap": {
1072 "version": "1.19.1", 643 "version": "1.0.2",
1073 "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", 644 "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
1074 "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", 645 "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
1075 "dev": true 646 "dev": true
1076 }, 647 },
1077 "read": { 648 "read": {
@@ -1094,55 +665,19 @@
1094 "util-deprecate": "^1.0.1" 665 "util-deprecate": "^1.0.1"
1095 } 666 }
1096 }, 667 },
1097 "rechoir": {
1098 "version": "0.6.2",
1099 "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
1100 "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
1101 "dev": true,
1102 "requires": {
1103 "resolve": "^1.1.6"
1104 }
1105 },
1106 "require-directory": {
1107 "version": "2.1.1",
1108 "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
1109 "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
1110 "dev": true
1111 },
1112 "require-main-filename": {
1113 "version": "2.0.0",
1114 "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
1115 "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
1116 "dev": true
1117 },
1118 "resolve": { 668 "resolve": {
1119 "version": "1.9.0", 669 "version": "1.14.1",
1120 "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.9.0.tgz", 670 "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.1.tgz",
1121 "integrity": "sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ==", 671 "integrity": "sha512-fn5Wobh4cxbLzuHaE+nphztHy43/b++4M6SsGFC2gB8uYwf0C8LcarfCz1un7UTW8OFQg9iNjZ4xpcFVGebDPg==",
1122 "dev": true, 672 "dev": true,
1123 "requires": { 673 "requires": {
1124 "path-parse": "^1.0.6" 674 "path-parse": "^1.0.6"
1125 } 675 }
1126 }, 676 },
1127 "resolve-url": {
1128 "version": "0.2.1",
1129 "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
1130 "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
1131 "dev": true
1132 },
1133 "rimraf": {
1134 "version": "2.7.1",
1135 "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
1136 "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
1137 "dev": true,
1138 "requires": {
1139 "glob": "^7.1.3"
1140 }
1141 },
1142 "rollup": { 677 "rollup": {
1143 "version": "1.27.13", 678 "version": "1.27.14",
1144 "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.27.13.tgz", 679 "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.27.14.tgz",
1145 "integrity": "sha512-hDi7M07MpmNSDE8YVwGVFA8L7n8jTLJ4lG65nMAijAyqBe//rtu4JdxjUBE7JqXfdpqxqDTbCDys9WcqdpsQvw==", 680 "integrity": "sha512-DuDjEyn8Y79ALYXMt+nH/EI58L5pEw5HU9K38xXdRnxQhvzUTI/nxAawhkAHUQeudANQ//8iyrhVRHJBuR6DSQ==",
1146 "dev": true, 681 "dev": true,
1147 "requires": { 682 "requires": {
1148 "@types/estree": "*", 683 "@types/estree": "*",
@@ -1150,100 +685,6 @@
1150 "acorn": "^7.1.0" 685 "acorn": "^7.1.0"
1151 } 686 }
1152 }, 687 },
1153 "rollup-plugin-commonjs": {
1154 "version": "10.1.0",
1155 "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz",
1156 "integrity": "sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q==",
1157 "dev": true,
1158 "requires": {
1159 "estree-walker": "^0.6.1",
1160 "is-reference": "^1.1.2",
1161 "magic-string": "^0.25.2",
1162 "resolve": "^1.11.0",
1163 "rollup-pluginutils": "^2.8.1"
1164 },
1165 "dependencies": {
1166 "resolve": {
1167 "version": "1.12.0",
1168 "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
1169 "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
1170 "dev": true,
1171 "requires": {
1172 "path-parse": "^1.0.6"
1173 }
1174 }
1175 }
1176 },
1177 "rollup-plugin-node-resolve": {
1178 "version": "5.2.0",
1179 "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz",
1180 "integrity": "sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw==",
1181 "dev": true,
1182 "requires": {
1183 "@types/resolve": "0.0.8",
1184 "builtin-modules": "^3.1.0",
1185 "is-module": "^1.0.0",
1186 "resolve": "^1.11.1",
1187 "rollup-pluginutils": "^2.8.1"
1188 },
1189 "dependencies": {
1190 "builtin-modules": {
1191 "version": "3.1.0",
1192 "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz",
1193 "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==",
1194 "dev": true
1195 },
1196 "resolve": {
1197 "version": "1.12.0",
1198 "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
1199 "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
1200 "dev": true,
1201 "requires": {
1202 "path-parse": "^1.0.6"
1203 }
1204 }
1205 }
1206 },
1207 "rollup-plugin-sourcemaps": {
1208 "version": "0.4.2",
1209 "resolved": "https://registry.npmjs.org/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.4.2.tgz",
1210 "integrity": "sha1-YhJaqUCHqt97g+9N+vYptHMTXoc=",
1211 "dev": true,
1212 "requires": {
1213 "rollup-pluginutils": "^2.0.1",
1214 "source-map-resolve": "^0.5.0"
1215 }
1216 },
1217 "rollup-plugin-typescript": {
1218 "version": "1.0.1",
1219 "resolved": "https://registry.npmjs.org/rollup-plugin-typescript/-/rollup-plugin-typescript-1.0.1.tgz",
1220 "integrity": "sha512-rwJDNn9jv/NsKZuyBb/h0jsclP4CJ58qbvZt2Q9zDIGILF2LtdtvCqMOL+Gq9IVq5MTrTlHZNrn8h7VjQgd8tw==",
1221 "dev": true,
1222 "requires": {
1223 "resolve": "^1.10.0",
1224 "rollup-pluginutils": "^2.5.0"
1225 },
1226 "dependencies": {
1227 "resolve": {
1228 "version": "1.12.0",
1229 "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
1230 "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
1231 "dev": true,
1232 "requires": {
1233 "path-parse": "^1.0.6"
1234 }
1235 }
1236 }
1237 },
1238 "rollup-pluginutils": {
1239 "version": "2.8.2",
1240 "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz",
1241 "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==",
1242 "dev": true,
1243 "requires": {
1244 "estree-walker": "^0.6.1"
1245 }
1246 },
1247 "safe-buffer": { 688 "safe-buffer": {
1248 "version": "5.2.0", 689 "version": "5.2.0",
1249 "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", 690 "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",
@@ -1256,64 +697,14 @@
1256 "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==" 697 "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg=="
1257 }, 698 },
1258 "semver": { 699 "semver": {
1259 "version": "5.7.1", 700 "version": "6.3.0",
1260 "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 701 "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
1261 "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 702 "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
1262 "dev": true
1263 }, 703 },
1264 "set-blocking": { 704 "sigmund": {
1265 "version": "2.0.0", 705 "version": "1.0.1",
1266 "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", 706 "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
1267 "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", 707 "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=",
1268 "dev": true
1269 },
1270 "shelljs": {
1271 "version": "0.8.3",
1272 "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz",
1273 "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==",
1274 "dev": true,
1275 "requires": {
1276 "glob": "^7.0.0",
1277 "interpret": "^1.0.0",
1278 "rechoir": "^0.6.2"
1279 }
1280 },
1281 "shx": {
1282 "version": "0.3.2",
1283 "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.2.tgz",
1284 "integrity": "sha512-aS0mWtW3T2sHAenrSrip2XGv39O9dXIFUqxAEWHEOS1ePtGIBavdPJY1kE2IHl14V/4iCbUiNDPGdyYTtmhSoA==",
1285 "dev": true,
1286 "requires": {
1287 "es6-object-assign": "^1.0.3",
1288 "minimist": "^1.2.0",
1289 "shelljs": "^0.8.1"
1290 },
1291 "dependencies": {
1292 "minimist": {
1293 "version": "1.2.0",
1294 "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
1295 "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
1296 "dev": true
1297 }
1298 }
1299 },
1300 "source-map-resolve": {
1301 "version": "0.5.2",
1302 "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz",
1303 "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==",
1304 "dev": true,
1305 "requires": {
1306 "atob": "^2.1.1",
1307 "decode-uri-component": "^0.2.0",
1308 "resolve-url": "^0.2.1",
1309 "source-map-url": "^0.4.0",
1310 "urix": "^0.1.0"
1311 }
1312 },
1313 "source-map-url": {
1314 "version": "0.4.0",
1315 "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
1316 "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
1317 "dev": true 708 "dev": true
1318 }, 709 },
1319 "sourcemap-codec": { 710 "sourcemap-codec": {
@@ -1328,36 +719,6 @@
1328 "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 719 "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
1329 "dev": true 720 "dev": true
1330 }, 721 },
1331 "string-width": {
1332 "version": "2.1.1",
1333 "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
1334 "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
1335 "dev": true,
1336 "requires": {
1337 "is-fullwidth-code-point": "^2.0.0",
1338 "strip-ansi": "^4.0.0"
1339 }
1340 },
1341 "string.prototype.trimleft": {
1342 "version": "2.1.0",
1343 "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz",
1344 "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==",
1345 "dev": true,
1346 "requires": {
1347 "define-properties": "^1.1.3",
1348 "function-bind": "^1.1.1"
1349 }
1350 },
1351 "string.prototype.trimright": {
1352 "version": "2.1.0",
1353 "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz",
1354 "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==",
1355 "dev": true,
1356 "requires": {
1357 "define-properties": "^1.1.3",
1358 "function-bind": "^1.1.1"
1359 }
1360 },
1361 "string_decoder": { 722 "string_decoder": {
1362 "version": "1.3.0", 723 "version": "1.3.0",
1363 "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", 724 "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
@@ -1367,25 +728,10 @@
1367 "safe-buffer": "~5.2.0" 728 "safe-buffer": "~5.2.0"
1368 } 729 }
1369 }, 730 },
1370 "strip-ansi": {
1371 "version": "4.0.0",
1372 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
1373 "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
1374 "dev": true,
1375 "requires": {
1376 "ansi-regex": "^3.0.0"
1377 }
1378 },
1379 "strip-json-comments": {
1380 "version": "2.0.1",
1381 "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
1382 "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
1383 "dev": true
1384 },
1385 "supports-color": { 731 "supports-color": {
1386 "version": "6.0.0", 732 "version": "5.5.0",
1387 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", 733 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
1388 "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", 734 "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
1389 "dev": true, 735 "dev": true,
1390 "requires": { 736 "requires": {
1391 "has-flag": "^3.0.0" 737 "has-flag": "^3.0.0"
@@ -1427,31 +773,20 @@
1427 "tsutils": "^2.29.0" 773 "tsutils": "^2.29.0"
1428 }, 774 },
1429 "dependencies": { 775 "dependencies": {
1430 "diff": { 776 "builtin-modules": {
1431 "version": "4.0.1", 777 "version": "1.1.1",
1432 "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", 778 "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
1433 "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", 779 "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
780 "dev": true
781 },
782 "semver": {
783 "version": "5.7.1",
784 "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
785 "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
1434 "dev": true 786 "dev": true
1435 } 787 }
1436 } 788 }
1437 }, 789 },
1438 "tslint-config-prettier": {
1439 "version": "1.18.0",
1440 "resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz",
1441 "integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==",
1442 "dev": true
1443 },
1444 "tslint-plugin-prettier": {
1445 "version": "2.0.1",
1446 "resolved": "https://registry.npmjs.org/tslint-plugin-prettier/-/tslint-plugin-prettier-2.0.1.tgz",
1447 "integrity": "sha512-4FX9JIx/1rKHIPJNfMb+ooX1gPk5Vg3vNi7+dyFYpLO+O57F4g+b/fo1+W/G0SUOkBLHB/YKScxjX/P+7ZT/Tw==",
1448 "dev": true,
1449 "requires": {
1450 "eslint-plugin-prettier": "^2.2.0",
1451 "lines-and-columns": "^1.1.6",
1452 "tslib": "^1.7.1"
1453 }
1454 },
1455 "tsutils": { 790 "tsutils": {
1456 "version": "2.29.0", 791 "version": "2.29.0",
1457 "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", 792 "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz",
@@ -1478,11 +813,21 @@
1478 } 813 }
1479 }, 814 },
1480 "typescript": { 815 "typescript": {
1481 "version": "3.7.3", 816 "version": "3.7.4",
1482 "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.3.tgz", 817 "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.4.tgz",
1483 "integrity": "sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw==", 818 "integrity": "sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==",
1484 "dev": true 819 "dev": true
1485 }, 820 },
821 "typescript-formatter": {
822 "version": "7.2.2",
823 "resolved": "https://registry.npmjs.org/typescript-formatter/-/typescript-formatter-7.2.2.tgz",
824 "integrity": "sha512-V7vfI9XArVhriOTYHPzMU2WUnm5IMdu9X/CPxs8mIMGxmTBFpDABlbkBka64PZJ9/xgQeRpK8KzzAG4MPzxBDQ==",
825 "dev": true,
826 "requires": {
827 "commandpost": "^1.0.0",
828 "editorconfig": "^0.15.0"
829 }
830 },
1486 "uc.micro": { 831 "uc.micro": {
1487 "version": "1.0.6", 832 "version": "1.0.6",
1488 "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", 833 "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
@@ -1495,12 +840,6 @@
1495 "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", 840 "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=",
1496 "dev": true 841 "dev": true
1497 }, 842 },
1498 "urix": {
1499 "version": "0.1.0",
1500 "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
1501 "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
1502 "dev": true
1503 },
1504 "url-join": { 843 "url-join": {
1505 "version": "1.1.0", 844 "version": "1.1.0",
1506 "resolved": "https://registry.npmjs.org/url-join/-/url-join-1.1.0.tgz", 845 "resolved": "https://registry.npmjs.org/url-join/-/url-join-1.1.0.tgz",
@@ -1539,6 +878,14 @@
1539 "url-join": "^1.1.0", 878 "url-join": "^1.1.0",
1540 "yauzl": "^2.3.1", 879 "yauzl": "^2.3.1",
1541 "yazl": "^2.2.2" 880 "yazl": "^2.2.2"
881 },
882 "dependencies": {
883 "semver": {
884 "version": "5.7.1",
885 "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
886 "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
887 "dev": true
888 }
1542 } 889 }
1543 }, 890 },
1544 "vscode-jsonrpc": { 891 "vscode-jsonrpc": {
@@ -1553,13 +900,6 @@
1553 "requires": { 900 "requires": {
1554 "semver": "^6.3.0", 901 "semver": "^6.3.0",
1555 "vscode-languageserver-protocol": "^3.15.0-next.14" 902 "vscode-languageserver-protocol": "^3.15.0-next.14"
1556 },
1557 "dependencies": {
1558 "semver": {
1559 "version": "6.3.0",
1560 "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
1561 "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
1562 }
1563 } 903 }
1564 }, 904 },
1565 "vscode-languageserver-protocol": { 905 "vscode-languageserver-protocol": {
@@ -1576,159 +916,18 @@
1576 "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.15.0-next.9.tgz", 916 "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.15.0-next.9.tgz",
1577 "integrity": "sha512-Rl/8qJ6932nrHCdPn+9y0x08uLVQaSLRG+U4JzhyKpWU4eJbVaDRoAcz1Llj7CErJGbPr6kdBvShPy5fRfR+Uw==" 917 "integrity": "sha512-Rl/8qJ6932nrHCdPn+9y0x08uLVQaSLRG+U4JzhyKpWU4eJbVaDRoAcz1Llj7CErJGbPr6kdBvShPy5fRfR+Uw=="
1578 }, 918 },
1579 "vscode-test": {
1580 "version": "1.3.0",
1581 "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-1.3.0.tgz",
1582 "integrity": "sha512-LddukcBiSU2FVTDr3c1D8lwkiOvwlJdDL2hqVbn6gIz+rpTqUCkMZSKYm94Y1v0WXlHSDQBsXyY+tchWQgGVsw==",
1583 "dev": true,
1584 "requires": {
1585 "http-proxy-agent": "^2.1.0",
1586 "https-proxy-agent": "^2.2.4",
1587 "rimraf": "^2.6.3"
1588 }
1589 },
1590 "which": {
1591 "version": "1.3.1",
1592 "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
1593 "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
1594 "dev": true,
1595 "requires": {
1596 "isexe": "^2.0.0"
1597 }
1598 },
1599 "which-module": {
1600 "version": "2.0.0",
1601 "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
1602 "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
1603 "dev": true
1604 },
1605 "wide-align": {
1606 "version": "1.1.3",
1607 "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
1608 "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
1609 "dev": true,
1610 "requires": {
1611 "string-width": "^1.0.2 || 2"
1612 }
1613 },
1614 "wrap-ansi": {
1615 "version": "5.1.0",
1616 "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
1617 "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
1618 "dev": true,
1619 "requires": {
1620 "ansi-styles": "^3.2.0",
1621 "string-width": "^3.0.0",
1622 "strip-ansi": "^5.0.0"
1623 },
1624 "dependencies": {
1625 "ansi-regex": {
1626 "version": "4.1.0",
1627 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
1628 "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
1629 "dev": true
1630 },
1631 "string-width": {
1632 "version": "3.1.0",
1633 "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
1634 "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
1635 "dev": true,
1636 "requires": {
1637 "emoji-regex": "^7.0.1",
1638 "is-fullwidth-code-point": "^2.0.0",
1639 "strip-ansi": "^5.1.0"
1640 }
1641 },
1642 "strip-ansi": {
1643 "version": "5.2.0",
1644 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
1645 "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
1646 "dev": true,
1647 "requires": {
1648 "ansi-regex": "^4.1.0"
1649 }
1650 }
1651 }
1652 },
1653 "wrappy": { 919 "wrappy": {
1654 "version": "1.0.2", 920 "version": "1.0.2",
1655 "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 921 "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
1656 "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 922 "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
1657 "dev": true 923 "dev": true
1658 }, 924 },
1659 "y18n": { 925 "yallist": {
1660 "version": "4.0.0", 926 "version": "2.1.2",
1661 "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", 927 "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
1662 "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", 928 "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
1663 "dev": true 929 "dev": true
1664 }, 930 },
1665 "yargs": {
1666 "version": "13.3.0",
1667 "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz",
1668 "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==",
1669 "dev": true,
1670 "requires": {
1671 "cliui": "^5.0.0",
1672 "find-up": "^3.0.0",
1673 "get-caller-file": "^2.0.1",
1674 "require-directory": "^2.1.1",
1675 "require-main-filename": "^2.0.0",
1676 "set-blocking": "^2.0.0",
1677 "string-width": "^3.0.0",
1678 "which-module": "^2.0.0",
1679 "y18n": "^4.0.0",
1680 "yargs-parser": "^13.1.1"
1681 },
1682 "dependencies": {
1683 "ansi-regex": {
1684 "version": "4.1.0",
1685 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
1686 "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
1687 "dev": true
1688 },
1689 "string-width": {
1690 "version": "3.1.0",
1691 "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
1692 "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
1693 "dev": true,
1694 "requires": {
1695 "emoji-regex": "^7.0.1",
1696 "is-fullwidth-code-point": "^2.0.0",
1697 "strip-ansi": "^5.1.0"
1698 }
1699 },
1700 "strip-ansi": {
1701 "version": "5.2.0",
1702 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
1703 "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
1704 "dev": true,
1705 "requires": {
1706 "ansi-regex": "^4.1.0"
1707 }
1708 }
1709 }
1710 },
1711 "yargs-parser": {
1712 "version": "13.1.1",
1713 "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz",
1714 "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==",
1715 "dev": true,
1716 "requires": {
1717 "camelcase": "^5.0.0",
1718 "decamelize": "^1.2.0"
1719 }
1720 },
1721 "yargs-unparser": {
1722 "version": "1.6.0",
1723 "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz",
1724 "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==",
1725 "dev": true,
1726 "requires": {
1727 "flat": "^4.1.0",
1728 "lodash": "^4.17.15",
1729 "yargs": "^13.3.0"
1730 }
1731 },
1732 "yauzl": { 931 "yauzl": {
1733 "version": "2.10.0", 932 "version": "2.10.0",
1734 "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", 933 "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
diff --git a/editors/code/package.json b/editors/code/package.json
index f75fafeb9..7d809a2d3 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -16,47 +16,29 @@
16 "vscode": "^1.41.0" 16 "vscode": "^1.41.0"
17 }, 17 },
18 "scripts": { 18 "scripts": {
19 "vscode:prepublish": "npm run compile", 19 "vscode:prepublish": "rollup -c",
20 "package": "vsce package", 20 "package": "vsce package",
21 "compile": "rollup -c && shx cp src/utils/terminateProcess.sh bundle/terminateProcess.sh",
22 "watch": "tsc -watch -p ./", 21 "watch": "tsc -watch -p ./",
23 "fix": "prettier **/*.{json,ts} --write && tslint --project . --fix", 22 "fmt": "tsfmt -r && tslint -c tslint.json 'src/**/*.ts' --fix"
24 "lint": "tslint --project .",
25 "prettier": "prettier **/*.{json,ts}",
26 "test": "tsc -p . && node ./out/test/runTest.js",
27 "travis": "npm run compile && npm run test && npm run lint && npm run prettier -- --write && git diff --exit-code"
28 },
29 "prettier": {
30 "singleQuote": true,
31 "tabWidth": 4,
32 "trailingComma": "all"
33 }, 23 },
34 "dependencies": { 24 "dependencies": {
35 "lookpath": "^1.0.4", 25 "jsonc-parser": "^2.1.0",
36 "seedrandom": "^3.0.5", 26 "seedrandom": "^3.0.5",
37 "vscode-languageclient": "^6.0.0-next.9" 27 "vscode-languageclient": "^6.0.0-next.9"
38 }, 28 },
39 "devDependencies": { 29 "devDependencies": {
40 "@types/glob": "^7.1.1", 30 "@rollup/plugin-commonjs": "^11.0.0",
41 "@types/mocha": "^5.2.7", 31 "@rollup/plugin-node-resolve": "^6.0.0",
32 "@rollup/plugin-typescript": "^2.0.1",
42 "@types/node": "^12.12.21", 33 "@types/node": "^12.12.21",
43 "@types/seedrandom": "^2.4.28", 34 "@types/seedrandom": "^2.4.28",
44 "@types/vscode": "^1.41.0", 35 "@types/vscode": "^1.41.0",
45 "glob": "^7.1.6", 36 "rollup": "^1.27.14",
46 "mocha": "^6.2.2", 37 "tslib": "^1.10.0",
47 "prettier": "^1.19.1",
48 "rollup": "^1.27.13",
49 "rollup-plugin-commonjs": "^10.1.0",
50 "rollup-plugin-node-resolve": "^5.2.0",
51 "rollup-plugin-sourcemaps": "^0.4.2",
52 "rollup-plugin-typescript": "^1.0.1",
53 "shx": "^0.3.1",
54 "tslint": "^5.20.1", 38 "tslint": "^5.20.1",
55 "tslint-config-prettier": "^1.18.0",
56 "tslint-plugin-prettier": "^2.0.1",
57 "typescript": "^3.7.3", 39 "typescript": "^3.7.3",
58 "vsce": "^1.71.0", 40 "typescript-formatter": "^7.2.2",
59 "vscode-test": "^1.3.0" 41 "vsce": "^1.71.0"
60 }, 42 },
61 "activationEvents": [ 43 "activationEvents": [
62 "onLanguage:rust", 44 "onLanguage:rust",
@@ -64,7 +46,7 @@
64 "onCommand:rust-analyzer.collectGarbage", 46 "onCommand:rust-analyzer.collectGarbage",
65 "workspaceContains:**/Cargo.toml" 47 "workspaceContains:**/Cargo.toml"
66 ], 48 ],
67 "main": "./bundle/extension", 49 "main": "./out/main",
68 "contributes": { 50 "contributes": {
69 "taskDefinitions": [ 51 "taskDefinitions": [
70 { 52 {
@@ -133,16 +115,6 @@
133 "command": "rust-analyzer.reload", 115 "command": "rust-analyzer.reload",
134 "title": "Restart server", 116 "title": "Restart server",
135 "category": "Rust Analyzer" 117 "category": "Rust Analyzer"
136 },
137 {
138 "command": "rust-analyzer.startCargoWatch",
139 "title": "Start Cargo Watch",
140 "category": "Rust Analyzer"
141 },
142 {
143 "command": "rust-analyzer.stopCargoWatch",
144 "title": "Stop Cargo Watch",
145 "category": "Rust Analyzer"
146 } 118 }
147 ], 119 ],
148 "keybindings": [ 120 "keybindings": [
@@ -198,21 +170,6 @@
198 "default": "ra_lsp_server", 170 "default": "ra_lsp_server",
199 "description": "Path to ra_lsp_server executable" 171 "description": "Path to ra_lsp_server executable"
200 }, 172 },
201 "rust-analyzer.enableCargoWatchOnStartup": {
202 "type": "string",
203 "default": "ask",
204 "enum": [
205 "ask",
206 "enabled",
207 "disabled"
208 ],
209 "enumDescriptions": [
210 "Asks each time whether to run `cargo watch`",
211 "`cargo watch` is always started",
212 "Don't start `cargo watch`"
213 ],
214 "description": "Whether to run `cargo watch` on startup"
215 },
216 "rust-analyzer.excludeGlobs": { 173 "rust-analyzer.excludeGlobs": {
217 "type": "array", 174 "type": "array",
218 "default": [], 175 "default": [],
@@ -223,21 +180,21 @@
223 "default": true, 180 "default": true,
224 "description": "client provided file watching instead of notify watching." 181 "description": "client provided file watching instead of notify watching."
225 }, 182 },
183 "rust-analyzer.cargo-watch.enable": {
184 "type": "boolean",
185 "default": true,
186 "description": "Run `cargo check` for diagnostics on save"
187 },
226 "rust-analyzer.cargo-watch.arguments": { 188 "rust-analyzer.cargo-watch.arguments": {
227 "type": "string", 189 "type": "array",
228 "description": "`cargo-watch` arguments. (e.g: `--features=\"shumway,pdf\"` will run as `cargo watch -x \"check --features=\"shumway,pdf\"\"` )", 190 "description": "`cargo-watch` arguments. (e.g: `--features=\"shumway,pdf\"` will run as `cargo watch -x \"check --features=\"shumway,pdf\"\"` )",
229 "default": "" 191 "default": []
230 }, 192 },
231 "rust-analyzer.cargo-watch.command": { 193 "rust-analyzer.cargo-watch.command": {
232 "type": "string", 194 "type": "string",
233 "description": "`cargo-watch` command. (e.g: `clippy` will run as `cargo watch -x clippy` )", 195 "description": "`cargo-watch` command. (e.g: `clippy` will run as `cargo watch -x clippy` )",
234 "default": "check" 196 "default": "check"
235 }, 197 },
236 "rust-analyzer.cargo-watch.ignore": {
237 "type": "array",
238 "description": "A list of patterns for cargo-watch to ignore (will be passed as `--ignore`)",
239 "default": []
240 },
241 "rust-analyzer.cargo-watch.allTargets": { 198 "rust-analyzer.cargo-watch.allTargets": {
242 "type": "boolean", 199 "type": "boolean",
243 "description": "Check all targets and tests (will be passed as `--all-targets`)", 200 "description": "Check all targets and tests (will be passed as `--all-targets`)",
@@ -259,17 +216,6 @@
259 "default": "off", 216 "default": "off",
260 "description": "Trace requests to the ra_lsp_server" 217 "description": "Trace requests to the ra_lsp_server"
261 }, 218 },
262 "rust-analyzer.trace.cargo-watch": {
263 "type": "string",
264 "scope": "window",
265 "enum": [
266 "off",
267 "error",
268 "verbose"
269 ],
270 "default": "off",
271 "description": "Trace output of cargo-watch"
272 },
273 "rust-analyzer.lruCapacity": { 219 "rust-analyzer.lruCapacity": {
274 "type": "number", 220 "type": "number",
275 "default": null, 221 "default": null,
@@ -367,232 +313,7 @@
367 ], 313 ],
368 "colors": [ 314 "colors": [
369 { 315 {
370 "id": "ralsp.comment", 316 "id": "rust_analyzer.inlayHint",
371 "description": "Color for comments",
372 "defaults": {
373 "dark": "#6A9955",
374 "light": "#008000",
375 "highContrast": "#7CA668"
376 }
377 },
378 {
379 "id": "ralsp.string",
380 "description": "Color for strings",
381 "defaults": {
382 "dark": "#CE9178",
383 "light": "#A31515",
384 "highContrast": "#CE9178"
385 }
386 },
387 {
388 "id": "ralsp.keyword",
389 "description": "Color for keywords",
390 "defaults": {
391 "dark": "#569cd6",
392 "light": "#0000FF",
393 "highContrast": "#569CD6"
394 }
395 },
396 {
397 "id": "ralsp.keyword.control",
398 "description": "Color for control keywords",
399 "defaults": {
400 "dark": "#C586C0",
401 "light": "#AF00DB",
402 "highContrast": "#C586C0"
403 }
404 },
405 {
406 "id": "ralsp.keyword.unsafe",
407 "description": "Color for unsafe",
408 "defaults": {
409 "dark": "#FF3030",
410 "light": "#FF1010",
411 "highContrast": "#FF1010"
412 }
413 },
414 {
415 "id": "ralsp.function",
416 "description": "Color for functions",
417 "defaults": {
418 "dark": "#DCDCAA",
419 "light": "#795E26",
420 "highContrast": "#DCDCAA"
421 }
422 },
423 {
424 "id": "ralsp.parameter",
425 "description": "Color for parameters",
426 "defaults": {
427 "dark": "#9CDCFE",
428 "light": "#001080",
429 "highContrast": "#9CDCFE"
430 }
431 },
432 {
433 "id": "ralsp.builtin",
434 "description": "Color for builtins",
435 "defaults": {
436 "dark": "#DD6718",
437 "light": "#DD6718",
438 "highContrast": "#DD6718"
439 }
440 },
441 {
442 "id": "ralsp.text",
443 "description": "Color for text",
444 "defaults": {
445 "dark": "#D4D4D4",
446 "light": "#000000",
447 "highContrast": "#FFFFFF"
448 }
449 },
450 {
451 "id": "ralsp.attribute",
452 "description": "Color for attributes",
453 "defaults": {
454 "dark": "#9FE9BF",
455 "light": "#1F4B1F",
456 "highContrast": "#108010"
457 }
458 },
459 {
460 "id": "ralsp.literal",
461 "description": "Color for literals",
462 "defaults": {
463 "dark": "#BECEA8",
464 "light": "#09885A",
465 "highContrast": "#B5CEA8"
466 }
467 },
468 {
469 "id": "ralsp.literal.numeric",
470 "description": "Color for numeric literals",
471 "defaults": {
472 "dark": "#BECEA8",
473 "light": "#09885A",
474 "highContrast": "#B5CEA8"
475 }
476 },
477 {
478 "id": "ralsp.literal.char",
479 "description": "Color for character literals",
480 "defaults": {
481 "dark": "#BECEA8",
482 "light": "#09885A",
483 "highContrast": "#B5CEA8"
484 }
485 },
486 {
487 "id": "ralsp.literal.byte",
488 "description": "Color for byte literals",
489 "defaults": {
490 "dark": "#BECEA8",
491 "light": "#09885A",
492 "highContrast": "#B5CEA8"
493 }
494 },
495 {
496 "id": "ralsp.macro",
497 "description": "Color for macros",
498 "defaults": {
499 "dark": "#BFEBBF",
500 "light": "#DD6718",
501 "highContrast": "#ED7718"
502 }
503 },
504 {
505 "id": "ralsp.constant",
506 "description": "Color for constants",
507 "defaults": {
508 "dark": "#569cd6",
509 "light": "#267cb6",
510 "highContrast": "#569cd6"
511 }
512 },
513 {
514 "id": "ralsp.type",
515 "description": "Color for other types (traits, aliases..)",
516 "defaults": {
517 "dark": "#4EC9B0",
518 "light": "#267F99",
519 "highContrast": "#4EC9B0"
520 }
521 },
522 {
523 "id": "ralsp.type.builtin",
524 "description": "Color for built-in types (&str, bool, u16, u32)",
525 "defaults": {
526 "dark": "#4EC9B0",
527 "light": "#267F99",
528 "highContrast": "#4EC9B0"
529 }
530 },
531 {
532 "id": "ralsp.type.lifetime",
533 "description": "Color for lifetimes parameters",
534 "defaults": {
535 "dark": "#4EC9B0",
536 "light": "#267F99",
537 "highContrast": "#4EC9B0"
538 }
539 },
540 {
541 "id": "ralsp.type.self",
542 "description": "Color for `Self` param type",
543 "defaults": {
544 "dark": "#4EC9B0",
545 "light": "#267F99",
546 "highContrast": "#4EC9B0"
547 }
548 },
549 {
550 "id": "ralsp.type.param",
551 "description": "Color for type parameters",
552 "defaults": {
553 "dark": "#4EC9B0",
554 "light": "#267F99",
555 "highContrast": "#4EC9B0"
556 }
557 },
558 {
559 "id": "ralsp.field",
560 "description": "Color for fields",
561 "defaults": {
562 "dark": "#4EC9B0",
563 "light": "#267F99",
564 "highContrast": "#4EC9B0"
565 }
566 },
567 {
568 "id": "ralsp.variable",
569 "description": "Color for variables",
570 "defaults": {
571 "dark": "#4EC9B0",
572 "light": "#267F99",
573 "highContrast": "#4EC9B0"
574 }
575 },
576 {
577 "id": "ralsp.variable.mut",
578 "description": "Color for mutable variables",
579 "defaults": {
580 "dark": "#4EC9B0",
581 "light": "#267F99",
582 "highContrast": "#4EC9B0"
583 }
584 },
585 {
586 "id": "ralsp.module",
587 "description": "Color for modules",
588 "defaults": {
589 "dark": "#D4D4D4",
590 "light": "#000000",
591 "highContrast": "#FFFFFF"
592 }
593 },
594 {
595 "id": "ralsp.inlayHint",
596 "description": "Color for inlay hints", 317 "description": "Color for inlay hints",
597 "defaults": { 318 "defaults": {
598 "dark": "#A0A0A0F0", 319 "dark": "#A0A0A0F0",
diff --git a/editors/code/rollup.config.js b/editors/code/rollup.config.js
index 1b222bbe7..14fb9e085 100644
--- a/editors/code/rollup.config.js
+++ b/editors/code/rollup.config.js
@@ -1,30 +1,25 @@
1import typescript from 'rollup-plugin-typescript'; 1import typescript from '@rollup/plugin-typescript';
2import resolve from 'rollup-plugin-node-resolve'; 2import resolve from '@rollup/plugin-node-resolve';
3import commonjs from 'rollup-plugin-commonjs'; 3import commonjs from '@rollup/plugin-commonjs';
4import sourcemaps from 'rollup-plugin-sourcemaps'
5import nodeBuiltins from 'builtin-modules'; 4import nodeBuiltins from 'builtin-modules';
6 5
7export default { 6export default {
8 input: './src/extension.ts', 7 input: 'src/main.ts',
9 plugins: [ 8 plugins: [
10 typescript(), 9 typescript(),
11 sourcemaps(), 10 resolve({
12 resolve(), 11 preferBuiltins: true
12 }),
13 commonjs({ 13 commonjs({
14 namedExports: { 14 namedExports: {
15 // squelch missing import warnings 15 // squelch missing import warnings
16 'vscode-languageclient': [ 'CreateFile', 'RenameFile' ] 16 'vscode-languageclient': ['CreateFile', 'RenameFile', 'ErrorCodes']
17 } 17 }
18 }), 18 })
19 ],
20 // keep these as require() calls, bundle the rest
21 external: [
22 ...nodeBuiltins,
23 'vscode',
24 ], 19 ],
20 external: [...nodeBuiltins, 'vscode'],
25 output: { 21 output: {
26 file: './bundle/extension.js', 22 file: './out/main.js',
27 sourcemap: true, 23 format: 'cjs'
28 format: 'cjs',
29 } 24 }
30}; 25};
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts
new file mode 100644
index 000000000..743384bd7
--- /dev/null
+++ b/editors/code/src/client.ts
@@ -0,0 +1,90 @@
1import { homedir } from 'os';
2import * as lc from 'vscode-languageclient';
3
4import { window, workspace } from 'vscode';
5import { Config } from './config';
6
7export function createClient(config: Config): lc.LanguageClient {
8 // '.' Is the fallback if no folder is open
9 // TODO?: Workspace folders support Uri's (eg: file://test.txt). It might be a good idea to test if the uri points to a file.
10 let folder: string = '.';
11 if (workspace.workspaceFolders !== undefined) {
12 folder = workspace.workspaceFolders[0].uri.fsPath.toString();
13 }
14
15 const command = expandPathResolving(config.raLspServerPath);
16 const run: lc.Executable = {
17 command,
18 options: { cwd: folder },
19 };
20 const serverOptions: lc.ServerOptions = {
21 run,
22 debug: run,
23 };
24 const traceOutputChannel = window.createOutputChannel(
25 'Rust Analyzer Language Server Trace',
26 );
27 const clientOptions: lc.LanguageClientOptions = {
28 documentSelector: [{ scheme: 'file', language: 'rust' }],
29 initializationOptions: {
30 publishDecorations: true,
31 lruCapacity: config.lruCapacity,
32 maxInlayHintLength: config.maxInlayHintLength,
33 cargoWatchEnable: config.cargoWatchOptions.enable,
34 cargoWatchArgs: config.cargoWatchOptions.arguments,
35 cargoWatchCommand: config.cargoWatchOptions.command,
36 cargoWatchAllTargets:
37 config.cargoWatchOptions.allTargets,
38 excludeGlobs: config.excludeGlobs,
39 useClientWatching: config.useClientWatching,
40 featureFlags: config.featureFlags,
41 withSysroot: config.withSysroot,
42 cargoFeatures: config.cargoFeatures,
43 },
44 traceOutputChannel,
45 };
46
47 const res = new lc.LanguageClient(
48 'rust-analyzer',
49 'Rust Analyzer Language Server',
50 serverOptions,
51 clientOptions,
52 );
53
54 // HACK: This is an awful way of filtering out the decorations notifications
55 // However, pending proper support, this is the most effecitve approach
56 // Proper support for this would entail a change to vscode-languageclient to allow not notifying on certain messages
57 // Or the ability to disable the serverside component of highlighting (but this means that to do tracing we need to disable hihlighting)
58 // This also requires considering our settings strategy, which is work which needs doing
59 // @ts-ignore The tracer is private to vscode-languageclient, but we need access to it to not log publishDecorations requests
60 res._tracer = {
61 log: (messageOrDataObject: string | any, data?: string) => {
62 if (typeof messageOrDataObject === 'string') {
63 if (
64 messageOrDataObject.includes(
65 'rust-analyzer/publishDecorations',
66 ) ||
67 messageOrDataObject.includes(
68 'rust-analyzer/decorationsRequest',
69 )
70 ) {
71 // Don't log publish decorations requests
72 } else {
73 // @ts-ignore This is just a utility function
74 res.logTrace(messageOrDataObject, data);
75 }
76 } else {
77 // @ts-ignore
78 res.logObjectTrace(messageOrDataObject);
79 }
80 },
81 };
82 res.registerProposedFeatures();
83 return res;
84}
85function expandPathResolving(path: string) {
86 if (path.startsWith('~/')) {
87 return path.replace('~', homedir());
88 }
89 return path;
90}
diff --git a/editors/code/src/color_theme.ts b/editors/code/src/color_theme.ts
new file mode 100644
index 000000000..cbad47f35
--- /dev/null
+++ b/editors/code/src/color_theme.ts
@@ -0,0 +1,123 @@
1import * as fs from 'fs';
2import * as jsonc from 'jsonc-parser';
3import * as path from 'path';
4import * as vscode from 'vscode';
5
6export interface TextMateRuleSettings {
7 foreground?: string;
8 background?: string;
9 fontStyle?: string;
10}
11
12export class ColorTheme {
13 private rules: Map<string, TextMateRuleSettings> = new Map();
14
15 static load(): ColorTheme {
16 // Find out current color theme
17 const themeName = vscode.workspace
18 .getConfiguration('workbench')
19 .get('colorTheme');
20
21 if (typeof themeName !== 'string') {
22 // console.warn('workbench.colorTheme is', themeName)
23 return new ColorTheme();
24 }
25 return loadThemeNamed(themeName);
26 }
27
28 static fromRules(rules: TextMateRule[]): ColorTheme {
29 const res = new ColorTheme();
30 for (const rule of rules) {
31 const scopes = typeof rule.scope === 'string'
32 ? [rule.scope]
33 : rule.scope;
34 for (const scope of scopes) {
35 res.rules.set(scope, rule.settings);
36 }
37 }
38 return res;
39 }
40
41 lookup(scopes: string[]): TextMateRuleSettings {
42 let res: TextMateRuleSettings = {};
43 for (const scope of scopes) {
44 this.rules.forEach((value, key) => {
45 if (scope.startsWith(key)) {
46 res = mergeRuleSettings(res, value);
47 }
48 });
49 }
50 return res;
51 }
52
53 mergeFrom(other: ColorTheme) {
54 other.rules.forEach((value, key) => {
55 const merged = mergeRuleSettings(this.rules.get(key), value);
56 this.rules.set(key, merged);
57 });
58 }
59}
60
61function loadThemeNamed(themeName: string): ColorTheme {
62 function isTheme(extension: vscode.Extension<any>): boolean {
63 return (
64 extension.extensionKind === vscode.ExtensionKind.UI &&
65 extension.packageJSON.contributes &&
66 extension.packageJSON.contributes.themes
67 );
68 }
69
70 let themePaths = vscode.extensions.all
71 .filter(isTheme)
72 .flatMap(ext => {
73 return ext.packageJSON.contributes.themes
74 .filter((it: any) => (it.id || it.label) === themeName)
75 .map((it: any) => path.join(ext.extensionPath, it.path));
76 });
77
78 const res = new ColorTheme();
79 for (const themePath of themePaths) {
80 res.mergeFrom(loadThemeFile(themePath));
81 }
82
83 const customizations: any = vscode.workspace.getConfiguration('editor').get('tokenColorCustomizations');
84 res.mergeFrom(ColorTheme.fromRules(customizations?.textMateRules ?? []));
85
86 return res;
87}
88
89function loadThemeFile(themePath: string): ColorTheme {
90 let text;
91 try {
92 text = fs.readFileSync(themePath, 'utf8');
93 } catch {
94 return new ColorTheme();
95 }
96 const obj = jsonc.parse(text);
97 const tokenColors = obj?.tokenColors ?? [];
98 const res = ColorTheme.fromRules(tokenColors);
99
100 for (const include in obj?.include ?? []) {
101 const includePath = path.join(path.dirname(themePath), include);
102 const tmp = loadThemeFile(includePath);
103 res.mergeFrom(tmp);
104 }
105
106 return res;
107}
108
109interface TextMateRule {
110 scope: string | string[];
111 settings: TextMateRuleSettings;
112}
113
114function mergeRuleSettings(
115 defaultSetting: TextMateRuleSettings | undefined,
116 override: TextMateRuleSettings,
117): TextMateRuleSettings {
118 return {
119 foreground: override.foreground ?? defaultSetting?.foreground,
120 background: override.background ?? defaultSetting?.background,
121 fontStyle: override.fontStyle ?? defaultSetting?.fontStyle,
122 };
123}
diff --git a/editors/code/src/commands/analyzer_status.ts b/editors/code/src/commands/analyzer_status.ts
index 2777ced24..cfe7d1af0 100644
--- a/editors/code/src/commands/analyzer_status.ts
+++ b/editors/code/src/commands/analyzer_status.ts
@@ -1,45 +1,20 @@
1import * as vscode from 'vscode'; 1import * as vscode from 'vscode';
2import { Server } from '../server';
3 2
4const statusUri = vscode.Uri.parse('rust-analyzer-status://status'); 3import { Ctx, Cmd } from '../ctx';
5
6export class TextDocumentContentProvider
7 implements vscode.TextDocumentContentProvider {
8 public eventEmitter = new vscode.EventEmitter<vscode.Uri>();
9 public syntaxTree: string = 'Not available';
10
11 public provideTextDocumentContent(
12 _uri: vscode.Uri,
13 ): vscode.ProviderResult<string> {
14 const editor = vscode.window.activeTextEditor;
15 if (editor == null) {
16 return '';
17 }
18 return Server.client.sendRequest<string>(
19 'rust-analyzer/analyzerStatus',
20 null,
21 );
22 }
23
24 get onDidChange(): vscode.Event<vscode.Uri> {
25 return this.eventEmitter.event;
26 }
27}
28
29let poller: NodeJS.Timer | null = null;
30 4
31// Shows status of rust-analyzer (for debugging) 5// Shows status of rust-analyzer (for debugging)
6export function analyzerStatus(ctx: Ctx): Cmd {
7 let poller: NodeJS.Timer | null = null;
8 const tdcp = new TextDocumentContentProvider(ctx);
32 9
33export function makeCommand(context: vscode.ExtensionContext) { 10 ctx.pushCleanup(
34 const textDocumentContentProvider = new TextDocumentContentProvider();
35 context.subscriptions.push(
36 vscode.workspace.registerTextDocumentContentProvider( 11 vscode.workspace.registerTextDocumentContentProvider(
37 'rust-analyzer-status', 12 'rust-analyzer-status',
38 textDocumentContentProvider, 13 tdcp,
39 ), 14 ),
40 ); 15 );
41 16
42 context.subscriptions.push({ 17 ctx.pushCleanup({
43 dispose() { 18 dispose() {
44 if (poller != null) { 19 if (poller != null) {
45 clearInterval(poller); 20 clearInterval(poller);
@@ -49,12 +24,9 @@ export function makeCommand(context: vscode.ExtensionContext) {
49 24
50 return async function handle() { 25 return async function handle() {
51 if (poller == null) { 26 if (poller == null) {
52 poller = setInterval( 27 poller = setInterval(() => tdcp.eventEmitter.fire(tdcp.uri), 1000);
53 () => textDocumentContentProvider.eventEmitter.fire(statusUri),
54 1000,
55 );
56 } 28 }
57 const document = await vscode.workspace.openTextDocument(statusUri); 29 const document = await vscode.workspace.openTextDocument(tdcp.uri);
58 return vscode.window.showTextDocument( 30 return vscode.window.showTextDocument(
59 document, 31 document,
60 vscode.ViewColumn.Two, 32 vscode.ViewColumn.Two,
@@ -62,3 +34,31 @@ export function makeCommand(context: vscode.ExtensionContext) {
62 ); 34 );
63 }; 35 };
64} 36}
37
38class TextDocumentContentProvider
39 implements vscode.TextDocumentContentProvider {
40 private ctx: Ctx;
41 uri = vscode.Uri.parse('rust-analyzer-status://status');
42 eventEmitter = new vscode.EventEmitter<vscode.Uri>();
43
44 constructor(ctx: Ctx) {
45 this.ctx = ctx;
46 }
47
48 provideTextDocumentContent(
49 _uri: vscode.Uri,
50 ): vscode.ProviderResult<string> {
51 const editor = vscode.window.activeTextEditor;
52 const client = this.ctx.client;
53 if (!editor || !client) return '';
54
55 return client.sendRequest<string>(
56 'rust-analyzer/analyzerStatus',
57 null,
58 );
59 }
60
61 get onDidChange(): vscode.Event<vscode.Uri> {
62 return this.eventEmitter.event;
63 }
64}
diff --git a/editors/code/src/commands/cargo_watch.ts b/editors/code/src/commands/cargo_watch.ts
deleted file mode 100644
index ac62bdd48..000000000
--- a/editors/code/src/commands/cargo_watch.ts
+++ /dev/null
@@ -1,264 +0,0 @@
1import * as child_process from 'child_process';
2import * as path from 'path';
3import * as vscode from 'vscode';
4
5import { Server } from '../server';
6import { terminate } from '../utils/processes';
7import { LineBuffer } from './line_buffer';
8import { StatusDisplay } from './watch_status';
9
10import {
11 mapRustDiagnosticToVsCode,
12 RustDiagnostic,
13} from '../utils/diagnostics/rust';
14import SuggestedFixCollection from '../utils/diagnostics/SuggestedFixCollection';
15import { areDiagnosticsEqual } from '../utils/diagnostics/vscode';
16
17export async function registerCargoWatchProvider(
18 subscriptions: vscode.Disposable[],
19): Promise<CargoWatchProvider | undefined> {
20 let cargoExists = false;
21
22 // Check if the working directory is valid cargo root path
23 const cargoTomlPath = path.join(vscode.workspace.rootPath!, 'Cargo.toml');
24 const cargoTomlUri = vscode.Uri.file(cargoTomlPath);
25 const cargoTomlFileInfo = await vscode.workspace.fs.stat(cargoTomlUri);
26
27 if (cargoTomlFileInfo) {
28 cargoExists = true;
29 }
30
31 if (!cargoExists) {
32 vscode.window.showErrorMessage(
33 `Couldn\'t find \'Cargo.toml\' at ${cargoTomlPath}`,
34 );
35 return;
36 }
37
38 const provider = new CargoWatchProvider();
39 subscriptions.push(provider);
40 return provider;
41}
42
43export class CargoWatchProvider implements vscode.Disposable {
44 private readonly diagnosticCollection: vscode.DiagnosticCollection;
45 private readonly statusDisplay: StatusDisplay;
46 private readonly outputChannel: vscode.OutputChannel;
47
48 private suggestedFixCollection: SuggestedFixCollection;
49 private codeActionDispose: vscode.Disposable;
50
51 private cargoProcess?: child_process.ChildProcess;
52
53 constructor() {
54 this.diagnosticCollection = vscode.languages.createDiagnosticCollection(
55 'rustc',
56 );
57 this.statusDisplay = new StatusDisplay(
58 Server.config.cargoWatchOptions.command,
59 );
60 this.outputChannel = vscode.window.createOutputChannel(
61 'Cargo Watch Trace',
62 );
63
64 // Track `rustc`'s suggested fixes so we can convert them to code actions
65 this.suggestedFixCollection = new SuggestedFixCollection();
66 this.codeActionDispose = vscode.languages.registerCodeActionsProvider(
67 [{ scheme: 'file', language: 'rust' }],
68 this.suggestedFixCollection,
69 {
70 providedCodeActionKinds:
71 SuggestedFixCollection.PROVIDED_CODE_ACTION_KINDS,
72 },
73 );
74 }
75
76 public start() {
77 if (this.cargoProcess) {
78 vscode.window.showInformationMessage(
79 'Cargo Watch is already running',
80 );
81 return;
82 }
83
84 let args =
85 Server.config.cargoWatchOptions.command + ' --message-format json';
86 if (Server.config.cargoWatchOptions.allTargets) {
87 args += ' --all-targets';
88 }
89 if (Server.config.cargoWatchOptions.command.length > 0) {
90 // Excape the double quote string:
91 args += ' ' + Server.config.cargoWatchOptions.arguments;
92 }
93 // Windows handles arguments differently than the unix-likes, so we need to wrap the args in double quotes
94 if (process.platform === 'win32') {
95 args = '"' + args + '"';
96 }
97
98 const ignoreFlags = Server.config.cargoWatchOptions.ignore.reduce(
99 (flags, pattern) => [...flags, '--ignore', pattern],
100 [] as string[],
101 );
102
103 // Start the cargo watch with json message
104 this.cargoProcess = child_process.spawn(
105 'cargo',
106 ['watch', '-x', args, ...ignoreFlags],
107 {
108 stdio: ['ignore', 'pipe', 'pipe'],
109 cwd: vscode.workspace.rootPath,
110 windowsVerbatimArguments: true,
111 },
112 );
113
114 if (!this.cargoProcess) {
115 vscode.window.showErrorMessage('Cargo Watch failed to start');
116 return;
117 }
118
119 const stdoutData = new LineBuffer();
120 this.cargoProcess.stdout?.on('data', (s: string) => {
121 stdoutData.processOutput(s, line => {
122 this.logInfo(line);
123 try {
124 this.parseLine(line);
125 } catch (err) {
126 this.logError(`Failed to parse: ${err}, content : ${line}`);
127 }
128 });
129 });
130
131 const stderrData = new LineBuffer();
132 this.cargoProcess.stderr?.on('data', (s: string) => {
133 stderrData.processOutput(s, line => {
134 this.logError('Error on cargo-watch : {\n' + line + '}\n');
135 });
136 });
137
138 this.cargoProcess.on('error', (err: Error) => {
139 this.logError(
140 'Error on cargo-watch process : {\n' + err.message + '}\n',
141 );
142 });
143
144 this.logInfo('cargo-watch started.');
145 }
146
147 public stop() {
148 if (this.cargoProcess) {
149 this.cargoProcess.kill();
150 terminate(this.cargoProcess);
151 this.cargoProcess = undefined;
152 } else {
153 vscode.window.showInformationMessage('Cargo Watch is not running');
154 }
155 }
156
157 public dispose(): void {
158 this.stop();
159
160 this.diagnosticCollection.clear();
161 this.diagnosticCollection.dispose();
162 this.outputChannel.dispose();
163 this.statusDisplay.dispose();
164 this.codeActionDispose.dispose();
165 }
166
167 private logInfo(line: string) {
168 if (Server.config.cargoWatchOptions.trace === 'verbose') {
169 this.outputChannel.append(line);
170 }
171 }
172
173 private logError(line: string) {
174 if (
175 Server.config.cargoWatchOptions.trace === 'error' ||
176 Server.config.cargoWatchOptions.trace === 'verbose'
177 ) {
178 this.outputChannel.append(line);
179 }
180 }
181
182 private parseLine(line: string) {
183 if (line.startsWith('[Running')) {
184 this.diagnosticCollection.clear();
185 this.suggestedFixCollection.clear();
186 this.statusDisplay.show();
187 }
188
189 if (line.startsWith('[Finished running')) {
190 this.statusDisplay.hide();
191 }
192
193 interface CargoArtifact {
194 reason: string;
195 package_id: string;
196 }
197
198 // https://github.com/rust-lang/cargo/blob/master/src/cargo/util/machine_message.rs
199 interface CargoMessage {
200 reason: string;
201 package_id: string;
202 message: RustDiagnostic;
203 }
204
205 // cargo-watch itself output non json format
206 // Ignore these lines
207 let data: CargoMessage;
208 try {
209 data = JSON.parse(line.trim());
210 } catch (error) {
211 this.logError(`Fail to parse to json : { ${error} }`);
212 return;
213 }
214
215 if (data.reason === 'compiler-artifact') {
216 const msg = data as CargoArtifact;
217
218 // The format of the package_id is "{name} {version} ({source_id})",
219 // https://github.com/rust-lang/cargo/blob/37ad03f86e895bb80b474c1c088322634f4725f5/src/cargo/core/package_id.rs#L53
220 this.statusDisplay.packageName = msg.package_id.split(' ')[0];
221 } else if (data.reason === 'compiler-message') {
222 const msg = data.message as RustDiagnostic;
223
224 const mapResult = mapRustDiagnosticToVsCode(msg);
225 if (!mapResult) {
226 return;
227 }
228
229 const { location, diagnostic, suggestedFixes } = mapResult;
230 const fileUri = location.uri;
231
232 const diagnostics: vscode.Diagnostic[] = [
233 ...(this.diagnosticCollection!.get(fileUri) || []),
234 ];
235
236 // If we're building multiple targets it's possible we've already seen this diagnostic
237 const isDuplicate = diagnostics.some(d =>
238 areDiagnosticsEqual(d, diagnostic),
239 );
240 if (isDuplicate) {
241 return;
242 }
243
244 diagnostics.push(diagnostic);
245 this.diagnosticCollection!.set(fileUri, diagnostics);
246
247 if (suggestedFixes.length) {
248 for (const suggestedFix of suggestedFixes) {
249 this.suggestedFixCollection.addSuggestedFixForDiagnostic(
250 suggestedFix,
251 diagnostic,
252 );
253 }
254
255 // Have VsCode query us for the code actions
256 vscode.commands.executeCommand(
257 'vscode.executeCodeActionProvider',
258 fileUri,
259 diagnostic.range,
260 );
261 }
262 }
263 }
264}
diff --git a/editors/code/src/commands/expand_macro.ts b/editors/code/src/commands/expand_macro.ts
index 17c78280a..dcdde78af 100644
--- a/editors/code/src/commands/expand_macro.ts
+++ b/editors/code/src/commands/expand_macro.ts
@@ -1,60 +1,23 @@
1import * as vscode from 'vscode'; 1import * as vscode from 'vscode';
2import { Position, TextDocumentIdentifier } from 'vscode-languageclient'; 2import * as lc from 'vscode-languageclient';
3import { Server } from '../server';
4 3
5export const expandMacroUri = vscode.Uri.parse( 4import { Ctx, Cmd } from '../ctx';
6 'rust-analyzer://expandMacro/[EXPANSION].rs',
7);
8
9export class ExpandMacroContentProvider
10 implements vscode.TextDocumentContentProvider {
11 public eventEmitter = new vscode.EventEmitter<vscode.Uri>();
12
13 public provideTextDocumentContent(
14 _uri: vscode.Uri,
15 ): vscode.ProviderResult<string> {
16 async function handle() {
17 const editor = vscode.window.activeTextEditor;
18 if (editor == null) {
19 return '';
20 }
21
22 const position = editor.selection.active;
23 const request: MacroExpandParams = {
24 textDocument: { uri: editor.document.uri.toString() },
25 position,
26 };
27 const expanded = await Server.client.sendRequest<ExpandedMacro>(
28 'rust-analyzer/expandMacro',
29 request,
30 );
31
32 if (expanded == null) {
33 return 'Not available';
34 }
35
36 return code_format(expanded);
37 }
38
39 return handle();
40 }
41
42 get onDidChange(): vscode.Event<vscode.Uri> {
43 return this.eventEmitter.event;
44 }
45}
46 5
47// Opens the virtual file that will show the syntax tree 6// Opens the virtual file that will show the syntax tree
48// 7//
49// The contents of the file come from the `TextDocumentContentProvider` 8// The contents of the file come from the `TextDocumentContentProvider`
50export function createHandle(provider: ExpandMacroContentProvider) { 9export function expandMacro(ctx: Ctx): Cmd {
51 return async () => { 10 const tdcp = new TextDocumentContentProvider(ctx);
52 const uri = expandMacroUri; 11 ctx.pushCleanup(
53 12 vscode.workspace.registerTextDocumentContentProvider(
54 const document = await vscode.workspace.openTextDocument(uri); 13 'rust-analyzer',
55 14 tdcp,
56 provider.eventEmitter.fire(uri); 15 ),
16 );
57 17
18 return async () => {
19 const document = await vscode.workspace.openTextDocument(tdcp.uri);
20 tdcp.eventEmitter.fire(tdcp.uri);
58 return vscode.window.showTextDocument( 21 return vscode.window.showTextDocument(
59 document, 22 document,
60 vscode.ViewColumn.Two, 23 vscode.ViewColumn.Two,
@@ -63,11 +26,6 @@ export function createHandle(provider: ExpandMacroContentProvider) {
63 }; 26 };
64} 27}
65 28
66interface MacroExpandParams {
67 textDocument: TextDocumentIdentifier;
68 position: Position;
69}
70
71interface ExpandedMacro { 29interface ExpandedMacro {
72 name: string; 30 name: string;
73 expansion: string; 31 expansion: string;
@@ -81,3 +39,38 @@ function code_format(expanded: ExpandedMacro): string {
81 39
82 return result; 40 return result;
83} 41}
42
43class TextDocumentContentProvider
44 implements vscode.TextDocumentContentProvider {
45 private ctx: Ctx;
46 uri = vscode.Uri.parse('rust-analyzer://expandMacro/[EXPANSION].rs');
47 eventEmitter = new vscode.EventEmitter<vscode.Uri>();
48
49 constructor(ctx: Ctx) {
50 this.ctx = ctx;
51 }
52
53 async provideTextDocumentContent(_uri: vscode.Uri): Promise<string> {
54 const editor = vscode.window.activeTextEditor;
55 const client = this.ctx.client;
56 if (!editor || !client) return '';
57
58 const position = editor.selection.active;
59 const request: lc.TextDocumentPositionParams = {
60 textDocument: { uri: editor.document.uri.toString() },
61 position,
62 };
63 const expanded = await client.sendRequest<ExpandedMacro>(
64 'rust-analyzer/expandMacro',
65 request,
66 );
67
68 if (expanded == null) return 'Not available';
69
70 return code_format(expanded);
71 }
72
73 get onDidChange(): vscode.Event<vscode.Uri> {
74 return this.eventEmitter.event;
75 }
76}
diff --git a/editors/code/src/commands/index.ts b/editors/code/src/commands/index.ts
index 13a696758..9a1697dcb 100644
--- a/editors/code/src/commands/index.ts
+++ b/editors/code/src/commands/index.ts
@@ -1,23 +1,63 @@
1import * as analyzerStatus from './analyzer_status'; 1import * as vscode from 'vscode';
2import * as applySourceChange from './apply_source_change'; 2import * as lc from 'vscode-languageclient';
3import * as expandMacro from './expand_macro'; 3
4import * as inlayHints from './inlay_hints'; 4import { Ctx, Cmd } from '../ctx';
5import * as joinLines from './join_lines'; 5import * as sourceChange from '../source_change';
6import * as matchingBrace from './matching_brace'; 6
7import * as onEnter from './on_enter'; 7import { analyzerStatus } from './analyzer_status';
8import * as parentModule from './parent_module'; 8import { matchingBrace } from './matching_brace';
9import * as runnables from './runnables'; 9import { joinLines } from './join_lines';
10import * as syntaxTree from './syntaxTree'; 10import { onEnter } from './on_enter';
11import { parentModule } from './parent_module';
12import { syntaxTree } from './syntax_tree';
13import { expandMacro } from './expand_macro';
14import { run, runSingle } from './runnables';
15
16function collectGarbage(ctx: Ctx): Cmd {
17 return async () => {
18 ctx.client?.sendRequest<null>('rust-analyzer/collectGarbage', null);
19 };
20}
21
22function showReferences(ctx: Ctx): Cmd {
23 return (uri: string, position: lc.Position, locations: lc.Location[]) => {
24 let client = ctx.client;
25 if (client) {
26 vscode.commands.executeCommand(
27 'editor.action.showReferences',
28 vscode.Uri.parse(uri),
29 client.protocol2CodeConverter.asPosition(position),
30 locations.map(client.protocol2CodeConverter.asLocation),
31 );
32 }
33 };
34}
35
36function applySourceChange(ctx: Ctx): Cmd {
37 return async (change: sourceChange.SourceChange) => {
38 sourceChange.applySourceChange(ctx, change);
39 };
40}
41
42function reload(ctx: Ctx): Cmd {
43 return async () => {
44 vscode.window.showInformationMessage('Reloading rust-analyzer...');
45 await ctx.restartServer();
46 };
47}
11 48
12export { 49export {
13 analyzerStatus, 50 analyzerStatus,
14 applySourceChange,
15 expandMacro, 51 expandMacro,
16 joinLines, 52 joinLines,
17 matchingBrace, 53 matchingBrace,
18 parentModule, 54 parentModule,
19 runnables,
20 syntaxTree, 55 syntaxTree,
21 onEnter, 56 onEnter,
22 inlayHints, 57 collectGarbage,
58 run,
59 runSingle,
60 showReferences,
61 applySourceChange,
62 reload
23}; 63};
diff --git a/editors/code/src/commands/inlay_hints.ts b/editors/code/src/commands/inlay_hints.ts
deleted file mode 100644
index ac7dcce60..000000000
--- a/editors/code/src/commands/inlay_hints.ts
+++ /dev/null
@@ -1,115 +0,0 @@
1import * as vscode from 'vscode';
2import { Range, TextDocumentChangeEvent, TextEditor } from 'vscode';
3import { TextDocumentIdentifier } from 'vscode-languageclient';
4import { Server } from '../server';
5
6interface InlayHintsParams {
7 textDocument: TextDocumentIdentifier;
8}
9
10interface InlayHint {
11 range: Range;
12 kind: string;
13 label: string;
14}
15
16const typeHintDecorationType = vscode.window.createTextEditorDecorationType({
17 after: {
18 color: new vscode.ThemeColor('ralsp.inlayHint'),
19 },
20});
21
22export class HintsUpdater {
23 private displayHints = true;
24
25 public async toggleHintsDisplay(displayHints: boolean): Promise<void> {
26 if (this.displayHints !== displayHints) {
27 this.displayHints = displayHints;
28 return this.refreshVisibleEditorsHints(
29 displayHints ? undefined : [],
30 );
31 }
32 }
33
34 public async refreshHintsForVisibleEditors(
35 cause?: TextDocumentChangeEvent,
36 ): Promise<void> {
37 if (!this.displayHints) {
38 return;
39 }
40 if (
41 cause !== undefined &&
42 (cause.contentChanges.length === 0 ||
43 !this.isRustDocument(cause.document))
44 ) {
45 return;
46 }
47 return this.refreshVisibleEditorsHints();
48 }
49
50 private async refreshVisibleEditorsHints(
51 newDecorations?: vscode.DecorationOptions[],
52 ) {
53 const promises: Array<Promise<void>> = [];
54
55 for (const rustEditor of vscode.window.visibleTextEditors.filter(
56 editor => this.isRustDocument(editor.document),
57 )) {
58 if (newDecorations !== undefined) {
59 promises.push(
60 Promise.resolve(
61 rustEditor.setDecorations(
62 typeHintDecorationType,
63 newDecorations,
64 ),
65 ),
66 );
67 } else {
68 promises.push(this.updateDecorationsFromServer(rustEditor));
69 }
70 }
71
72 for (const promise of promises) {
73 await promise;
74 }
75 }
76
77 private isRustDocument(document: vscode.TextDocument): boolean {
78 return document && document.languageId === 'rust';
79 }
80
81 private async updateDecorationsFromServer(
82 editor: TextEditor,
83 ): Promise<void> {
84 const newHints = await this.queryHints(editor.document.uri.toString());
85 if (newHints !== null) {
86 const newDecorations = newHints.map(hint => ({
87 range: hint.range,
88 renderOptions: {
89 after: {
90 contentText: `: ${hint.label}`,
91 },
92 },
93 }));
94 return editor.setDecorations(
95 typeHintDecorationType,
96 newDecorations,
97 );
98 }
99 }
100
101 private async queryHints(documentUri: string): Promise<InlayHint[] | null> {
102 const request: InlayHintsParams = {
103 textDocument: { uri: documentUri },
104 };
105 const client = Server.client;
106 return client
107 .onReady()
108 .then(() =>
109 client.sendRequest<InlayHint[] | null>(
110 'rust-analyzer/inlayHints',
111 request,
112 ),
113 );
114 }
115}
diff --git a/editors/code/src/commands/join_lines.ts b/editors/code/src/commands/join_lines.ts
index 134ddc801..7b08c3255 100644
--- a/editors/code/src/commands/join_lines.ts
+++ b/editors/code/src/commands/join_lines.ts
@@ -1,29 +1,27 @@
1import * as vscode from 'vscode'; 1import * as lc from 'vscode-languageclient';
2 2
3import { Range, TextDocumentIdentifier } from 'vscode-languageclient'; 3import { Ctx, Cmd } from '../ctx';
4import { Server } from '../server'; 4import { applySourceChange, SourceChange } from '../source_change';
5import {
6 handle as applySourceChange,
7 SourceChange,
8} from './apply_source_change';
9 5
10interface JoinLinesParams { 6export function joinLines(ctx: Ctx): Cmd {
11 textDocument: TextDocumentIdentifier; 7 return async () => {
12 range: Range; 8 const editor = ctx.activeRustEditor;
13} 9 const client = ctx.client;
10 if (!editor || !client) return;
14 11
15export async function handle() { 12 const request: JoinLinesParams = {
16 const editor = vscode.window.activeTextEditor; 13 range: client.code2ProtocolConverter.asRange(editor.selection),
17 if (editor == null || editor.document.languageId !== 'rust') { 14 textDocument: { uri: editor.document.uri.toString() },
18 return; 15 };
19 } 16 const change = await client.sendRequest<SourceChange>(
20 const request: JoinLinesParams = {