aboutsummaryrefslogtreecommitdiff
path: root/editors/code
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/.vscodeignore2
-rw-r--r--editors/code/package-lock.json1314
-rw-r--r--editors/code/package.json128
-rw-r--r--editors/code/rollup.config.js4
-rw-r--r--editors/code/rust.tmGrammar.json9
-rw-r--r--editors/code/src/ast_inspector.ts (renamed from editors/code/src/commands/syntax_tree.ts)88
-rw-r--r--editors/code/src/cargo.ts57
-rw-r--r--editors/code/src/client.ts41
-rw-r--r--editors/code/src/commands.ts370
-rw-r--r--editors/code/src/commands/analyzer_status.ts51
-rw-r--r--editors/code/src/commands/expand_macro.ts66
-rw-r--r--editors/code/src/commands/join_lines.ts22
-rw-r--r--editors/code/src/commands/matching_brace.ts27
-rw-r--r--editors/code/src/commands/on_enter.ts35
-rw-r--r--editors/code/src/commands/parent_module.ts29
-rw-r--r--editors/code/src/commands/server_version.ts15
-rw-r--r--editors/code/src/commands/ssr.ts30
-rw-r--r--editors/code/src/config.ts2
-rw-r--r--editors/code/src/debug.ts2
-rw-r--r--editors/code/src/inlay_hints.ts2
-rw-r--r--editors/code/src/lsp_ext.ts84
-rw-r--r--editors/code/src/main.ts59
-rw-r--r--editors/code/src/run.ts (renamed from editors/code/src/commands/runnables.ts)26
-rw-r--r--editors/code/src/rust-analyzer-api.ts125
-rw-r--r--editors/code/src/snippets.ts (renamed from editors/code/src/commands/index.ts)62
-rw-r--r--editors/code/src/source_change.ts54
-rw-r--r--editors/code/src/util.ts14
-rw-r--r--editors/code/tests/runTests.ts43
-rw-r--r--editors/code/tests/unit/index.ts38
-rw-r--r--editors/code/tests/unit/launch_config.test.ts52
-rw-r--r--editors/code/tsconfig.json9
31 files changed, 1961 insertions, 899 deletions
diff --git a/editors/code/.vscodeignore b/editors/code/.vscodeignore
index 257b744bf..7149ab799 100644
--- a/editors/code/.vscodeignore
+++ b/editors/code/.vscodeignore
@@ -1,5 +1,5 @@
1** 1**
2!out/main.js 2!out/src/main.js
3!package.json 3!package.json
4!package-lock.json 4!package-lock.json
5!ra_syntax_tree.tmGrammar.json 5!ra_syntax_tree.tmGrammar.json
diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json
index 06178990f..3b4a31682 100644
--- a/editors/code/package-lock.json
+++ b/editors/code/package-lock.json
@@ -13,21 +13,27 @@
13 "@babel/highlight": "^7.8.3" 13 "@babel/highlight": "^7.8.3"
14 } 14 }
15 }, 15 },
16 "@babel/helper-validator-identifier": {
17 "version": "7.9.5",
18 "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz",
19 "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==",
20 "dev": true
21 },
16 "@babel/highlight": { 22 "@babel/highlight": {
17 "version": "7.8.3", 23 "version": "7.9.0",
18 "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", 24 "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz",
19 "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", 25 "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==",
20 "dev": true, 26 "dev": true,
21 "requires": { 27 "requires": {
28 "@babel/helper-validator-identifier": "^7.9.0",
22 "chalk": "^2.0.0", 29 "chalk": "^2.0.0",
23 "esutils": "^2.0.2",
24 "js-tokens": "^4.0.0" 30 "js-tokens": "^4.0.0"
25 } 31 }
26 }, 32 },
27 "@rollup/plugin-commonjs": { 33 "@rollup/plugin-commonjs": {
28 "version": "11.1.0", 34 "version": "12.0.0",
29 "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.1.0.tgz", 35 "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-12.0.0.tgz",
30 "integrity": "sha512-Ycr12N3ZPN96Fw2STurD21jMqzKwL9QuFhms3SD7KKRK7oaXUsBU9Zt0jL/rOPHiPYisI21/rXGO3jr9BnLHUA==", 36 "integrity": "sha512-8+mDQt1QUmN+4Y9D3yCG8AJNewuTSLYPJVzKKUZ+lGeQrI+bV12Tc5HCyt2WdlnG6ihIL/DPbKRJlB40DX40mw==",
31 "dev": true, 37 "dev": true,
32 "requires": { 38 "requires": {
33 "@rollup/pluginutils": "^3.0.8", 39 "@rollup/pluginutils": "^3.0.8",
@@ -40,27 +46,29 @@
40 } 46 }
41 }, 47 },
42 "@rollup/plugin-node-resolve": { 48 "@rollup/plugin-node-resolve": {
43 "version": "7.1.3", 49 "version": "8.0.0",
44 "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz", 50 "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-8.0.0.tgz",
45 "integrity": "sha512-RxtSL3XmdTAE2byxekYLnx+98kEUOrPHF/KRVjLH+DEIHy6kjIw7YINQzn+NXiH/NTrQLAwYs0GWB+csWygA9Q==", 51 "integrity": "sha512-5poJCChrkVggXXND/sQ7yNqwjUNT4fP31gpRWCnSNnlXuUXTCMHT33xZrTGxgjm5Rl18MHj7iEzlCT8rYWwQSA==",
46 "dev": true, 52 "dev": true,
47 "requires": { 53 "requires": {
48 "@rollup/pluginutils": "^3.0.8", 54 "@rollup/pluginutils": "^3.0.8",
49 "@types/resolve": "0.0.8", 55 "@types/resolve": "0.0.8",
50 "builtin-modules": "^3.1.0", 56 "builtin-modules": "^3.1.0",
57 "deep-freeze": "^0.0.1",
58 "deepmerge": "^4.2.2",
51 "is-module": "^1.0.0", 59 "is-module": "^1.0.0",
52 "resolve": "^1.14.2" 60 "resolve": "^1.14.2"
53 } 61 }
54 }, 62 },
55 "@rollup/pluginutils": { 63 "@rollup/pluginutils": {
56 "version": "3.0.9", 64 "version": "3.0.10",
57 "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.9.tgz", 65 "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.10.tgz",
58 "integrity": "sha512-TLZavlfPAZYI7v33wQh4mTP6zojne14yok3DNSLcjoG/Hirxfkonn6icP5rrNWRn8nZsirJBFFpijVOJzkUHDg==", 66 "integrity": "sha512-d44M7t+PjmMrASHbhgpSbVgtL6EFyX7J4mYxwQ/c5eoaE6N2VgCgEcWVzNnwycIloti+/MpwFr8qfw+nRw00sw==",
59 "dev": true, 67 "dev": true,
60 "requires": { 68 "requires": {
61 "@types/estree": "0.0.39", 69 "@types/estree": "0.0.39",
62 "estree-walker": "^1.0.1", 70 "estree-walker": "^1.0.1",
63 "micromatch": "^4.0.2" 71 "picomatch": "^2.2.2"
64 } 72 }
65 }, 73 },
66 "@types/color-name": { 74 "@types/color-name": {
@@ -81,16 +89,45 @@
81 "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", 89 "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
82 "dev": true 90 "dev": true
83 }, 91 },
92 "@types/events": {
93 "version": "3.0.0",
94 "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz",
95 "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==",
96 "dev": true
97 },
98 "@types/glob": {
99 "version": "7.1.1",
100 "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz",
101 "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==",
102 "dev": true,
103 "requires": {
104 "@types/events": "*",
105 "@types/minimatch": "*",
106 "@types/node": "*"
107 }
108 },
84 "@types/json-schema": { 109 "@types/json-schema": {
85 "version": "7.0.4", 110 "version": "7.0.4",
86 "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", 111 "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz",
87 "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==", 112 "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==",
88 "dev": true 113 "dev": true
89 }, 114 },
115 "@types/minimatch": {
116 "version": "3.0.3",
117 "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
118 "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
119 "dev": true
120 },
121 "@types/mocha": {
122 "version": "7.0.2",
123 "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.2.tgz",
124 "integrity": "sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==",
125 "dev": true
126 },
90 "@types/node": { 127 "@types/node": {
91 "version": "12.12.39", 128 "version": "14.0.5",
92 "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.39.tgz", 129 "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.5.tgz",
93 "integrity": "sha512-pADGfwnDkr6zagDwEiCVE4yQrv7XDkoeVa4OfA9Ju/zRTk6YNDLGtQbkdL4/56mCQQCs4AhNrBIag6jrp7ZuOg==", 130 "integrity": "sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA==",
94 "dev": true 131 "dev": true
95 }, 132 },
96 "@types/node-fetch": { 133 "@types/node-fetch": {
@@ -119,56 +156,54 @@
119 "dev": true 156 "dev": true
120 }, 157 },
121 "@typescript-eslint/eslint-plugin": { 158 "@typescript-eslint/eslint-plugin": {
122 "version": "2.33.0", 159 "version": "3.0.0",
123 "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.33.0.tgz", 160 "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.0.0.tgz",
124 "integrity": "sha512-QV6P32Btu1sCI/kTqjTNI/8OpCYyvlGjW5vD8MpTIg+HGE5S88HtT1G+880M4bXlvXj/NjsJJG0aGcVh0DdbeQ==", 161 "integrity": "sha512-lcZ0M6jD4cqGccYOERKdMtg+VWpoq3NSnWVxpc/AwAy0zhkUYVioOUZmfNqiNH8/eBNGhCn6HXd6mKIGRgNc1Q==",
125 "dev": true, 162 "dev": true,
126 "requires": { 163 "requires": {
127 "@typescript-eslint/experimental-utils": "2.33.0", 164 "@typescript-eslint/experimental-utils": "3.0.0",
128 "functional-red-black-tree": "^1.0.1", 165 "functional-red-black-tree": "^1.0.1",
129 "regexpp": "^3.0.0", 166 "regexpp": "^3.0.0",
167 "semver": "^7.3.2",
130 "tsutils": "^3.17.1" 168 "tsutils": "^3.17.1"
169 },
170 "dependencies": {
171 "semver": {
172 "version": "7.3.2",
173 "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
174 "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
175 "dev": true
176 }
131 } 177 }
132 }, 178 },
133 "@typescript-eslint/experimental-utils": { 179 "@typescript-eslint/experimental-utils": {
134 "version": "2.33.0", 180 "version": "3.0.0",
135 "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.33.0.tgz", 181 "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.0.0.tgz",
136 "integrity": "sha512-qzPM2AuxtMrRq78LwyZa8Qn6gcY8obkIrBs1ehqmQADwkYzTE1Pb4y2W+U3rE/iFkSWcWHG2LS6MJfj6SmHApg==", 182 "integrity": "sha512-BN0vmr9N79M9s2ctITtChRuP1+Dls0x/wlg0RXW1yQ7WJKPurg6X3Xirv61J2sjPif4F8SLsFMs5Nzte0WYoTQ==",
137 "dev": true, 183 "dev": true,
138 "requires": { 184 "requires": {
139 "@types/json-schema": "^7.0.3", 185 "@types/json-schema": "^7.0.3",
140 "@typescript-eslint/typescript-estree": "2.33.0", 186 "@typescript-eslint/typescript-estree": "3.0.0",
141 "eslint-scope": "^5.0.0", 187 "eslint-scope": "^5.0.0",
142 "eslint-utils": "^2.0.0" 188 "eslint-utils": "^2.0.0"
143 },
144 "dependencies": {
145 "eslint-utils": {
146 "version": "2.0.0",
147 "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz",
148 "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==",
149 "dev": true,
150 "requires": {
151 "eslint-visitor-keys": "^1.1.0"
152 }
153 }
154 } 189 }
155 }, 190 },
156 "@typescript-eslint/parser": { 191 "@typescript-eslint/parser": {
157 "version": "2.33.0", 192 "version": "3.0.0",
158 "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.33.0.tgz", 193 "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.0.0.tgz",
159 "integrity": "sha512-AUtmwUUhJoH6yrtxZMHbRUEMsC2G6z5NSxg9KsROOGqNXasM71I8P2NihtumlWTUCRld70vqIZ6Pm4E5PAziEA==", 194 "integrity": "sha512-8RRCA9KLxoFNO0mQlrLZA0reGPd/MsobxZS/yPFj+0/XgMdS8+mO8mF3BDj2ZYQj03rkayhSJtF1HAohQ3iylw==",
160 "dev": true, 195 "dev": true,
161 "requires": { 196 "requires": {
162 "@types/eslint-visitor-keys": "^1.0.0", 197 "@types/eslint-visitor-keys": "^1.0.0",
163 "@typescript-eslint/experimental-utils": "2.33.0", 198 "@typescript-eslint/experimental-utils": "3.0.0",
164 "@typescript-eslint/typescript-estree": "2.33.0", 199 "@typescript-eslint/typescript-estree": "3.0.0",
165 "eslint-visitor-keys": "^1.1.0" 200 "eslint-visitor-keys": "^1.1.0"
166 } 201 }
167 }, 202 },
168 "@typescript-eslint/typescript-estree": { 203 "@typescript-eslint/typescript-estree": {
169 "version": "2.33.0", 204 "version": "3.0.0",
170 "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.33.0.tgz", 205 "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.0.0.tgz",
171 "integrity": "sha512-d8rY6/yUxb0+mEwTShCQF2zYQdLlqihukNfG9IUlLYz5y1CH6G/9XYbrxQLq3Z14RNvkCC6oe+OcFlyUpwUbkg==", 206 "integrity": "sha512-nevQvHyNghsfLrrByzVIH4ZG3NROgJ8LZlfh3ddwPPH4CH7W4GAiSx5qu+xHuX5pWsq6q/eqMc1io840ZhAnUg==",
172 "dev": true, 207 "dev": true,
173 "requires": { 208 "requires": {
174 "debug": "^4.1.1", 209 "debug": "^4.1.1",
@@ -189,9 +224,9 @@
189 } 224 }
190 }, 225 },
191 "acorn": { 226 "acorn": {
192 "version": "7.1.1", 227 "version": "7.2.0",
193 "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", 228 "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz",
194 "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", 229 "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==",
195 "dev": true 230 "dev": true
196 }, 231 },
197 "acorn-jsx": { 232 "acorn-jsx": {
@@ -200,10 +235,19 @@
200 "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", 235 "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==",
201 "dev": true 236 "dev": true
202 }, 237 },
238 "agent-base": {
239 "version": "4.3.0",
240 "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz",
241 "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==",
242 "dev": true,
243 "requires": {
244 "es6-promisify": "^5.0.0"
245 }
246 },
203 "ajv": { 247 "ajv": {
204 "version": "6.12.0", 248 "version": "6.12.2",
205 "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", 249 "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
206 "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", 250 "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==",
207 "dev": true, 251 "dev": true,
208 "requires": { 252 "requires": {
209 "fast-deep-equal": "^3.1.1", 253 "fast-deep-equal": "^3.1.1",
@@ -212,6 +256,12 @@
212 "uri-js": "^4.2.2" 256 "uri-js": "^4.2.2"
213 } 257 }
214 }, 258 },
259 "ansi-colors": {
260 "version": "3.2.3",
261 "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
262 "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==",
263 "dev": true
264 },
215 "ansi-escapes": { 265 "ansi-escapes": {
216 "version": "4.3.1", 266 "version": "4.3.1",
217 "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", 267 "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz",
@@ -244,6 +294,16 @@
244 "color-convert": "^1.9.0" 294 "color-convert": "^1.9.0"
245 } 295 }
246 }, 296 },
297 "anymatch": {
298 "version": "3.1.1",
299 "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
300 "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
301 "dev": true,
302 "requires": {
303 "normalize-path": "^3.0.0",
304 "picomatch": "^2.0.4"
305 }
306 },
247 "argparse": { 307 "argparse": {
248 "version": "1.0.10", 308 "version": "1.0.10",
249 "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 309 "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
@@ -283,6 +343,12 @@
283 "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 343 "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
284 "dev": true 344 "dev": true
285 }, 345 },
346 "binary-extensions": {
347 "version": "2.0.0",
348 "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz",
349 "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==",
350 "dev": true
351 },
286 "boolbase": { 352 "boolbase": {
287 "version": "1.0.0", 353 "version": "1.0.0",
288 "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", 354 "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
@@ -308,6 +374,12 @@
308 "fill-range": "^7.0.1" 374 "fill-range": "^7.0.1"
309 } 375 }
310 }, 376 },
377 "browser-stdout": {
378 "version": "1.3.1",
379 "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
380 "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
381 "dev": true
382 },
311 "buffer-crc32": { 383 "buffer-crc32": {
312 "version": "0.2.13", 384 "version": "0.2.13",
313 "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", 385 "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
@@ -326,6 +398,12 @@
326 "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", 398 "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
327 "dev": true 399 "dev": true
328 }, 400 },
401 "camelcase": {
402 "version": "5.3.1",
403 "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
404 "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
405 "dev": true
406 },
329 "chalk": { 407 "chalk": {
330 "version": "2.4.2", 408 "version": "2.4.2",
331 "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 409 "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
@@ -357,6 +435,22 @@
357 "parse5": "^3.0.1" 435 "parse5": "^3.0.1"
358 } 436 }
359 }, 437 },
438 "chokidar": {
439 "version": "3.3.0",
440 "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz",
441 "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==",
442 "dev": true,
443 "requires": {
444 "anymatch": "~3.1.1",
445 "braces": "~3.0.2",
446 "fsevents": "~2.1.1",
447 "glob-parent": "~5.1.0",
448 "is-binary-path": "~2.1.0",
449 "is-glob": "~4.0.1",
450 "normalize-path": "~3.0.0",
451 "readdirp": "~3.2.0"
452 }
453 },
360 "cli-cursor": { 454 "cli-cursor": {
361 "version": "3.1.0", 455 "version": "3.1.0",
362 "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", 456 "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
@@ -367,11 +461,62 @@
367 } 461 }
368 }, 462 },
369 "cli-width": { 463 "cli-width": {
370 "version": "2.2.0", 464 "version": "2.2.1",
371 "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", 465 "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz",
372 "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", 466 "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==",
373 "dev": true 467 "dev": true
374 }, 468 },
469 "cliui": {
470 "version": "5.0.0",
471 "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
472 "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
473 "dev": true,
474 "requires": {
475 "string-width": "^3.1.0",
476 "strip-ansi": "^5.2.0",
477 "wrap-ansi": "^5.1.0"
478 },
479 "dependencies": {
480 "ansi-regex": {
481 "version": "4.1.0",
482 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
483 "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
484 "dev": true
485 },
486 "emoji-regex": {
487 "version": "7.0.3",
488 "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
489 "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
490 "dev": true
491 },
492 "is-fullwidth-code-point": {
493 "version": "2.0.0",
494 "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
495 "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
496 "dev": true
497 },
498 "string-width": {
499 "version": "3.1.0",
500 "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
501 "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
502 "dev": true,
503 "requires": {
504 "emoji-regex": "^7.0.1",
505 "is-fullwidth-code-point": "^2.0.0",
506 "strip-ansi": "^5.1.0"
507 }
508 },
509 "strip-ansi": {
510 "version": "5.2.0",
511 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
512 "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
513 "dev": true,
514 "requires": {
515 "ansi-regex": "^4.1.0"
516 }
517 }
518 }
519 },
375 "color-convert": { 520 "color-convert": {
376 "version": "1.9.3", 521 "version": "1.9.3",
377 "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 522 "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@@ -421,24 +566,14 @@
421 "dev": true 566 "dev": true
422 }, 567 },
423 "cross-spawn": { 568 "cross-spawn": {
424 "version": "6.0.5", 569 "version": "7.0.2",
425 "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", 570 "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz",
426 "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", 571 "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==",
427 "dev": true, 572 "dev": true,
428 "requires": { 573 "requires": {
429 "nice-try": "^1.0.4", 574 "path-key": "^3.1.0",
430 "path-key": "^2.0.1", 575 "shebang-command": "^2.0.0",
431 "semver": "^5.5.0", 576 "which": "^2.0.1"
432 "shebang-command": "^1.2.0",
433 "which": "^1.2.9"
434 },
435 "dependencies": {
436 "semver": {
437 "version": "5.7.1",
438 "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
439 "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
440 "dev": true
441 }
442 } 577 }
443 }, 578 },
444 "css-select": { 579 "css-select": {
@@ -468,12 +603,39 @@
468 "ms": "^2.1.1" 603 "ms": "^2.1.1"
469 } 604 }
470 }, 605 },
606 "decamelize": {
607 "version": "1.2.0",
608 "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
609 "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
610 "dev": true
611 },
612 "deep-freeze": {
613 "version": "0.0.1",
614 "resolved": "https://registry.npmjs.org/deep-freeze/-/deep-freeze-0.0.1.tgz",
615 "integrity": "sha1-OgsABd4YZygZ39OM0x+RF5yJPoQ=",
616 "dev": true
617 },
471 "deep-is": { 618 "deep-is": {
472 "version": "0.1.3", 619 "version": "0.1.3",
473 "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", 620 "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
474 "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", 621 "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
475 "dev": true 622 "dev": true
476 }, 623 },
624 "deepmerge": {
625 "version": "4.2.2",
626 "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
627 "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==",
628 "dev": true
629 },
630 "define-properties": {
631 "version": "1.1.3",
632 "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
633 "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
634 "dev": true,
635 "requires": {
636 "object-keys": "^1.0.12"
637 }
638 },
477 "delayed-stream": { 639 "delayed-stream": {
478 "version": "1.0.0", 640 "version": "1.0.0",
479 "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 641 "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
@@ -486,6 +648,12 @@
486 "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=", 648 "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=",
487 "dev": true 649 "dev": true
488 }, 650 },
651 "diff": {
652 "version": "3.5.0",
653 "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
654 "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
655 "dev": true
656 },
489 "doctrine": { 657 "doctrine": {
490 "version": "3.0.0", 658 "version": "3.0.0",
491 "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", 659 "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
@@ -562,6 +730,51 @@
562 "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", 730 "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
563 "dev": true 731 "dev": true
564 }, 732 },
733 "es-abstract": {
734 "version": "1.17.5",
735 "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz",
736 "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==",
737 "dev": true,
738 "requires": {
739 "es-to-primitive": "^1.2.1",
740 "function-bind": "^1.1.1",
741 "has": "^1.0.3",
742 "has-symbols": "^1.0.1",
743 "is-callable": "^1.1.5",
744 "is-regex": "^1.0.5",
745 "object-inspect": "^1.7.0",
746 "object-keys": "^1.1.1",
747 "object.assign": "^4.1.0",
748 "string.prototype.trimleft": "^2.1.1",
749 "string.prototype.trimright": "^2.1.1"
750 }
751 },
752 "es-to-primitive": {
753 "version": "1.2.1",
754 "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
755 "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
756 "dev": true,
757 "requires": {
758 "is-callable": "^1.1.4",
759 "is-date-object": "^1.0.1",
760 "is-symbol": "^1.0.2"
761 }
762 },
763 "es6-promise": {
764 "version": "4.2.8",
765 "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz",
766 "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
767 "dev": true
768 },
769 "es6-promisify": {
770 "version": "5.0.0",
771 "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
772 "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
773 "dev": true,
774 "requires": {
775 "es6-promise": "^4.0.3"
776 }
777 },
565 "escape-string-regexp": { 778 "escape-string-regexp": {
566 "version": "1.0.5", 779 "version": "1.0.5",
567 "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 780 "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
@@ -569,22 +782,22 @@
569 "dev": true 782 "dev": true
570 }, 783 },
571 "eslint": { 784 "eslint": {
572 "version": "6.8.0", 785 "version": "7.1.0",
573 "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", 786 "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.1.0.tgz",
574 "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", 787 "integrity": "sha512-DfS3b8iHMK5z/YLSme8K5cge168I8j8o1uiVmFCgnnjxZQbCGyraF8bMl7Ju4yfBmCuxD7shOF7eqGkcuIHfsA==",
575 "dev": true, 788 "dev": true,
576 "requires": { 789 "requires": {
577 "@babel/code-frame": "^7.0.0", 790 "@babel/code-frame": "^7.0.0",
578 "ajv": "^6.10.0", 791 "ajv": "^6.10.0",
579 "chalk": "^2.1.0", 792 "chalk": "^4.0.0",
580 "cross-spawn": "^6.0.5", 793 "cross-spawn": "^7.0.2",
581 "debug": "^4.0.1", 794 "debug": "^4.0.1",
582 "doctrine": "^3.0.0", 795 "doctrine": "^3.0.0",
583 "eslint-scope": "^5.0.0", 796 "eslint-scope": "^5.0.0",
584 "eslint-utils": "^1.4.3", 797 "eslint-utils": "^2.0.0",
585 "eslint-visitor-keys": "^1.1.0", 798 "eslint-visitor-keys": "^1.1.0",
586 "espree": "^6.1.2", 799 "espree": "^7.0.0",
587 "esquery": "^1.0.1", 800 "esquery": "^1.2.0",
588 "esutils": "^2.0.2", 801 "esutils": "^2.0.2",
589 "file-entry-cache": "^5.0.1", 802 "file-entry-cache": "^5.0.1",
590 "functional-red-black-tree": "^1.0.1", 803 "functional-red-black-tree": "^1.0.1",
@@ -597,27 +810,76 @@
597 "is-glob": "^4.0.0", 810 "is-glob": "^4.0.0",
598 "js-yaml": "^3.13.1", 811 "js-yaml": "^3.13.1",
599 "json-stable-stringify-without-jsonify": "^1.0.1", 812 "json-stable-stringify-without-jsonify": "^1.0.1",
600 "levn": "^0.3.0", 813 "levn": "^0.4.1",
601 "lodash": "^4.17.14", 814 "lodash": "^4.17.14",
602 "minimatch": "^3.0.4", 815 "minimatch": "^3.0.4",
603 "mkdirp": "^0.5.1",
604 "natural-compare": "^1.4.0", 816 "natural-compare": "^1.4.0",
605 "optionator": "^0.8.3", 817 "optionator": "^0.9.1",
606 "progress": "^2.0.0", 818 "progress": "^2.0.0",
607 "regexpp": "^2.0.1", 819 "regexpp": "^3.1.0",
608 "semver": "^6.1.2", 820 "semver": "^7.2.1",
609 "strip-ansi": "^5.2.0", 821 "strip-ansi": "^6.0.0",
610 "strip-json-comments": "^3.0.1", 822 "strip-json-comments": "^3.1.0",
611 "table": "^5.2.3", 823 "table": "^5.2.3",
612 "text-table": "^0.2.0", 824 "text-table": "^0.2.0",
613 "v8-compile-cache": "^2.0.3" 825 "v8-compile-cache": "^2.0.3"
614 }, 826 },
615 "dependencies": { 827 "dependencies": {
616 "regexpp": { 828 "ansi-styles": {
829 "version": "4.2.1",
830 "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
831 "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
832 "dev": true,
833 "requires": {
834 "@types/color-name": "^1.1.1",
835 "color-convert": "^2.0.1"
836 }
837 },
838 "chalk": {
839 "version": "4.0.0",
840 "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz",
841 "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==",
842 "dev": true,
843 "requires": {
844 "ansi-styles": "^4.1.0",
845 "supports-color": "^7.1.0"
846 }
847 },
848 "color-convert": {
617 "version": "2.0.1", 849 "version": "2.0.1",
618 "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", 850 "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
619 "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", 851 "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
852 "dev": true,
853 "requires": {
854 "color-name": "~1.1.4"
855 }
856 },
857 "color-name": {
858 "version": "1.1.4",
859 "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
860 "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
861 "dev": true
862 },
863 "has-flag": {
864 "version": "4.0.0",
865 "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
866 "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
867 "dev": true
868 },
869 "semver": {
870 "version": "7.3.2",
871 "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
872 "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
620 "dev": true 873 "dev": true
874 },
875 "supports-color": {
876 "version": "7.1.0",
877 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
878 "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
879 "dev": true,
880 "requires": {
881 "has-flag": "^4.0.0"
882 }
621 } 883 }
622 } 884 }
623 }, 885 },
@@ -632,9 +894,9 @@
632 } 894 }
633 }, 895 },
634 "eslint-utils": { 896 "eslint-utils": {
635 "version": "1.4.3", 897 "version": "2.0.0",
636 "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", 898 "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz",
637 "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", 899 "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==",
638 "dev": true, 900 "dev": true,
639 "requires": { 901 "requires": {
640 "eslint-visitor-keys": "^1.1.0" 902 "eslint-visitor-keys": "^1.1.0"
@@ -647,9 +909,9 @@
647 "dev": true 909 "dev": true
648 }, 910 },
649 "espree": { 911 "espree": {
650 "version": "6.2.1", 912 "version": "7.0.0",
651 "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", 913 "resolved": "https://registry.npmjs.org/espree/-/espree-7.0.0.tgz",
652 "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", 914 "integrity": "sha512-/r2XEx5Mw4pgKdyb7GNLQNsu++asx/dltf/CI8RFi9oGHxmQFgvLbc5Op4U6i8Oaj+kdslhJtVlEZeAqH5qOTw==",
653 "dev": true, 915 "dev": true,
654 "requires": { 916 "requires": {
655 "acorn": "^7.1.1", 917 "acorn": "^7.1.1",
@@ -664,12 +926,20 @@
664 "dev": true 926 "dev": true
665 }, 927 },
666 "esquery": { 928 "esquery": {
667 "version": "1.1.0", 929 "version": "1.3.1",
668 "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz", 930 "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz",
669 "integrity": "sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q==", 931 "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==",
670 "dev": true, 932 "dev": true,
671 "requires": { 933 "requires": {
672 "estraverse": "^4.0.0" 934 "estraverse": "^5.1.0"
935 },
936 "dependencies": {
937 "estraverse": {
938 "version": "5.1.0",
939 "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz",
940 "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==",
941 "dev": true
942 }
673 } 943 }
674 }, 944 },
675 "esrecurse": { 945 "esrecurse": {
@@ -764,6 +1034,24 @@
764 "to-regex-range": "^5.0.1" 1034 "to-regex-range": "^5.0.1"
765 } 1035 }
766 }, 1036 },
1037 "find-up": {
1038 "version": "3.0.0",
1039 "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
1040 "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
1041 "dev": true,
1042 "requires": {
1043 "locate-path": "^3.0.0"
1044 }
1045 },
1046 "flat": {
1047 "version": "4.1.0",
1048 "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz",
1049 "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==",
1050 "dev": true,
1051 "requires": {
1052 "is-buffer": "~2.0.3"
1053 }
1054 },
767 "flat-cache": { 1055 "flat-cache": {
768 "version": "2.0.1", 1056 "version": "2.0.1",
769 "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", 1057 "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
@@ -776,9 +1064,9 @@
776 } 1064 }
777 }, 1065 },
778 "flatted": { 1066 "flatted": {
779 "version": "2.0.1", 1067 "version": "2.0.2",
780 "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", 1068 "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
781 "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", 1069 "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
782 "dev": true 1070 "dev": true
783 }, 1071 },
784 "form-data": { 1072 "form-data": {
@@ -805,12 +1093,24 @@
805 "dev": true, 1093 "dev": true,
806 "optional": true 1094 "optional": true
807 }, 1095 },
1096 "function-bind": {
1097 "version": "1.1.1",
1098 "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
1099 "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
1100 "dev": true
1101 },
808 "functional-red-black-tree": { 1102 "functional-red-black-tree": {
809 "version": "1.0.1", 1103 "version": "1.0.1",
810 "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", 1104 "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
811 "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", 1105 "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
812 "dev": true 1106 "dev": true
813 }, 1107 },
1108 "get-caller-file": {
1109 "version": "2.0.5",
1110 "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
1111 "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
1112 "dev": true
1113 },
814 "glob": { 1114 "glob": {
815 "version": "7.1.6", 1115 "version": "7.1.6",
816 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 1116 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
@@ -826,9 +1126,9 @@
826 } 1126 }
827 }, 1127 },
828 "glob-parent": { 1128 "glob-parent": {
829 "version": "5.1.0", 1129 "version": "5.1.1",
830 "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", 1130 "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
831 "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", 1131 "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
832 "dev": true, 1132 "dev": true,
833 "requires": { 1133 "requires": {
834 "is-glob": "^4.0.1" 1134 "is-glob": "^4.0.1"
@@ -843,12 +1143,39 @@
843 "type-fest": "^0.8.1" 1143 "type-fest": "^0.8.1"
844 } 1144 }
845 }, 1145 },
1146 "growl": {
1147 "version": "1.10.5",
1148 "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
1149 "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
1150 "dev": true
1151 },
1152 "has": {
1153 "version": "1.0.3",
1154 "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
1155 "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
1156 "dev": true,
1157 "requires": {
1158 "function-bind": "^1.1.1"
1159 }
1160 },
846 "has-flag": { 1161 "has-flag": {
847 "version": "3.0.0", 1162 "version": "3.0.0",
848 "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 1163 "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
849 "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 1164 "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
850 "dev": true 1165 "dev": true
851 }, 1166 },
1167 "has-symbols": {
1168 "version": "1.0.1",
1169 "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
1170 "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
1171 "dev": true
1172 },
1173 "he": {
1174 "version": "1.2.0",
1175 "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
1176 "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
1177 "dev": true
1178 },
852 "htmlparser2": { 1179 "htmlparser2": {
853 "version": "3.10.1", 1180 "version": "3.10.1",
854 "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", 1181 "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
@@ -863,6 +1190,54 @@
863 "readable-stream": "^3.1.1" 1190 "readable-stream": "^3.1.1"
864 } 1191 }
865 }, 1192 },
1193 "http-proxy-agent": {
1194 "version": "2.1.0",
1195 "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz",
1196 "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==",
1197 "dev": true,
1198 "requires": {
1199 "agent-base": "4",
1200 "debug": "3.1.0"
1201 },
1202 "dependencies": {
1203 "debug": {
1204 "version": "3.1.0",
1205 "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
1206 "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
1207 "dev": true,
1208 "requires": {
1209 "ms": "2.0.0"
1210 }
1211 },
1212 "ms": {
1213 "version": "2.0.0",
1214 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1215 "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
1216 "dev": true
1217 }
1218 }
1219 },
1220 "https-proxy-agent": {
1221 "version": "2.2.4",
1222 "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz",
1223 "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==",
1224 "dev": true,
1225 "requires": {
1226 "agent-base": "^4.3.0",
1227 "debug": "^3.1.0"
1228 },
1229 "dependencies": {
1230 "debug": {
1231 "version": "3.2.6",
1232 "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
1233 "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
1234 "dev": true,
1235 "requires": {
1236 "ms": "^2.1.1"
1237 }
1238 }
1239 }
1240 },
866 "iconv-lite": { 1241 "iconv-lite": {
867 "version": "0.4.24", 1242 "version": "0.4.24",
868 "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 1243 "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@@ -972,15 +1347,6 @@
972 "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 1347 "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
973 "dev": true 1348 "dev": true
974 }, 1349 },
975 "strip-ansi": {
976 "version": "6.0.0",
977 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
978 "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
979 "dev": true,
980 "requires": {
981 "ansi-regex": "^5.0.0"
982 }
983 },
984 "supports-color": { 1350 "supports-color": {
985 "version": "7.1.0", 1351 "version": "7.1.0",
986 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", 1352 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
@@ -992,6 +1358,33 @@
992 } 1358 }
993 } 1359 }
994 }, 1360 },
1361 "is-binary-path": {
1362 "version": "2.1.0",
1363 "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
1364 "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
1365 "dev": true,
1366 "requires": {
1367 "binary-extensions": "^2.0.0"
1368 }
1369 },
1370 "is-buffer": {
1371 "version": "2.0.4",
1372 "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
1373 "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
1374 "dev": true
1375 },
1376 "is-callable": {
1377 "version": "1.1.5",
1378 "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz",
1379 "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==",
1380 "dev": true
1381 },
1382 "is-date-object": {
1383 "version": "1.0.2",
1384 "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
1385 "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==",
1386 "dev": true
1387 },
995 "is-extglob": { 1388 "is-extglob": {
996 "version": "2.1.1", 1389 "version": "2.1.1",
997 "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1390 "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
@@ -1025,12 +1418,6 @@
1025 "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 1418 "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
1026 "dev": true 1419 "dev": true
1027 }, 1420 },
1028 "is-promise": {
1029 "version": "2.1.0",
1030 "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
1031 "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=",
1032 "dev": true
1033 },
1034 "is-reference": { 1421 "is-reference": {
1035 "version": "1.1.4", 1422 "version": "1.1.4",
1036 "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz", 1423 "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz",
@@ -1040,6 +1427,24 @@
1040 "@types/estree": "0.0.39" 1427 "@types/estree": "0.0.39"
1041 } 1428 }
1042 }, 1429 },
1430 "is-regex": {
1431 "version": "1.0.5",
1432 "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz",
1433 "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==",
1434 "dev": true,
1435 "requires": {
1436 "has": "^1.0.3"
1437 }
1438 },
1439 "is-symbol": {
1440 "version": "1.0.3",
1441 "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
1442 "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
1443 "dev": true,
1444 "requires": {
1445 "has-symbols": "^1.0.1"
1446 }
1447 },
1043 "isexe": { 1448 "isexe": {
1044 "version": "2.0.0", 1449 "version": "2.0.0",
1045 "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 1450 "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
@@ -1053,9 +1458,9 @@
1053 "dev": true 1458 "dev": true
1054 }, 1459 },
1055 "js-yaml": { 1460 "js-yaml": {
1056 "version": "3.13.1", 1461 "version": "3.14.0",
1057 "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", 1462 "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
1058 "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", 1463 "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
1059 "dev": true, 1464 "dev": true,
1060 "requires": { 1465 "requires": {
1061 "argparse": "^1.0.7", 1466 "argparse": "^1.0.7",
@@ -1081,13 +1486,13 @@
1081 "dev": true 1486 "dev": true
1082 }, 1487 },
1083 "levn": { 1488 "levn": {
1084 "version": "0.3.0", 1489 "version": "0.4.1",
1085 "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", 1490 "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
1086 "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", 1491 "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
1087 "dev": true, 1492 "dev": true,
1088 "requires": { 1493 "requires": {
1089 "prelude-ls": "~1.1.2", 1494 "prelude-ls": "^1.2.1",
1090 "type-check": "~0.3.2" 1495 "type-check": "~0.4.0"
1091 } 1496 }
1092 }, 1497 },
1093 "linkify-it": { 1498 "linkify-it": {
@@ -1099,12 +1504,31 @@
1099 "uc.micro": "^1.0.1" 1504 "uc.micro": "^1.0.1"
1100 } 1505 }
1101 }, 1506 },
1507 "locate-path": {
1508 "version": "3.0.0",
1509 "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
1510 "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
1511 "dev": true,
1512 "requires": {
1513 "p-locate": "^3.0.0",
1514 "path-exists": "^3.0.0"
1515 }
1516 },
1102 "lodash": { 1517 "lodash": {
1103 "version": "4.17.15", 1518 "version": "4.17.15",
1104 "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", 1519 "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
1105 "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", 1520 "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
1106 "dev": true 1521 "dev": true
1107 }, 1522 },
1523 "log-symbols": {
1524 "version": "3.0.0",
1525 "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz",
1526 "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==",
1527 "dev": true,
1528 "requires": {
1529 "chalk": "^2.4.2"
1530 }
1531 },
1108 "lru-cache": { 1532 "lru-cache": {
1109 "version": "4.1.5", 1533 "version": "4.1.5",
1110 "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", 1534 "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
@@ -1151,16 +1575,6 @@
1151 "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", 1575 "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=",
1152 "dev": true 1576 "dev": true
1153 }, 1577 },
1154 "micromatch": {
1155 "version": "4.0.2",
1156 "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
1157 "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
1158 "dev": true,
1159 "requires": {
1160 "braces": "^3.0.1",
1161 "picomatch": "^2.0.5"
1162 }
1163 },
1164 "mime": { 1578 "mime": {
1165 "version": "1.6.0", 1579 "version": "1.6.0",
1166 "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 1580 "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
@@ -1204,14 +1618,111 @@
1204 "dev": true 1618 "dev": true
1205 }, 1619 },
1206 "mkdirp": { 1620 "mkdirp": {
1207 "version": "0.5.3", 1621 "version": "0.5.5",
1208 "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", 1622 "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
1209 "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==", 1623 "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
1210 "dev": true, 1624 "dev": true,
1211 "requires": { 1625 "requires": {
1212 "minimist": "^1.2.5" 1626 "minimist": "^1.2.5"
1213 } 1627 }
1214 }, 1628 },
1629 "mocha": {
1630 "version": "7.2.0",
1631 "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz",
1632 "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==",
1633 "dev": true,
1634 "requires": {
1635 "ansi-colors": "3.2.3",
1636 "browser-stdout": "1.3.1",
1637 "chokidar": "3.3.0",
1638 "debug": "3.2.6",
1639 "diff": "3.5.0",
1640 "escape-string-regexp": "1.0.5",
1641 "find-up": "3.0.0",
1642 "glob": "7.1.3",
1643 "growl": "1.10.5",
1644 "he": "1.2.0",
1645 "js-yaml": "3.13.1",
1646 "log-symbols": "3.0.0",
1647 "minimatch": "3.0.4",
1648 "mkdirp": "0.5.5",
1649 "ms": "2.1.1",
1650 "node-environment-flags": "1.0.6",
1651 "object.assign": "4.1.0",
1652 "strip-json-comments": "2.0.1",
1653 "supports-color": "6.0.0",
1654 "which": "1.3.1",
1655 "wide-align": "1.1.3",
1656 "yargs": "13.3.2",
1657 "yargs-parser": "13.1.2",
1658 "yargs-unparser": "1.6.0"
1659 },
1660 "dependencies": {
1661 "debug": {
1662 "version": "3.2.6",
1663 "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
1664 "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
1665 "dev": true,
1666 "requires": {
1667 "ms": "^2.1.1"
1668 }
1669 },
1670 "glob": {
1671 "version": "7.1.3",
1672 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
1673 "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
1674 "dev": true,
1675 "requires": {
1676 "fs.realpath": "^1.0.0",
1677 "inflight": "^1.0.4",
1678 "inherits": "2",
1679 "minimatch": "^3.0.4",
1680 "once": "^1.3.0",
1681 "path-is-absolute": "^1.0.0"
1682 }
1683 },
1684 "js-yaml": {
1685 "version": "3.13.1",
1686 "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
1687 "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
1688 "dev": true,
1689 "requires": {
1690 "argparse": "^1.0.7",
1691 "esprima": "^4.0.0"
1692 }
1693 },
1694 "ms": {
1695 "version": "2.1.1",
1696 "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
1697 "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
1698 "dev": true
1699 },
1700 "strip-json-comments": {
1701 "version": "2.0.1",
1702 "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
1703 "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
1704 "dev": true
1705 },
1706 "supports-color": {
1707 "version": "6.0.0",
1708 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz",
1709 "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==",
1710 "dev": true,
1711 "requires": {
1712 "has-flag": "^3.0.0"
1713 }
1714 },
1715 "which": {
1716 "version": "1.3.1",
1717 "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
1718 "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
1719 "dev": true,
1720 "requires": {
1721 "isexe": "^2.0.0"
1722 }
1723 }
1724 }
1725 },
1215 "ms": { 1726 "ms": {
1216 "version": "2.1.2", 1727 "version": "2.1.2",
1217 "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1728 "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -1230,17 +1741,35 @@
1230 "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", 1741 "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
1231 "dev": true 1742 "dev": true
1232 }, 1743 },
1233 "nice-try": { 1744 "node-environment-flags": {
1234 "version": "1.0.5", 1745 "version": "1.0.6",
1235 "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", 1746 "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz",
1236 "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", 1747 "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==",
1237 "dev": true 1748 "dev": true,
1749 "requires": {
1750 "object.getownpropertydescriptors": "^2.0.3",
1751 "semver": "^5.7.0"
1752 },
1753 "dependencies": {
1754 "semver": {
1755 "version": "5.7.1",
1756 "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
1757 "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
1758 "dev": true
1759 }
1760 }
1238 }, 1761 },
1239 "node-fetch": { 1762 "node-fetch": {
1240 "version": "2.6.0", 1763 "version": "2.6.0",
1241 "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", 1764 "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
1242 "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" 1765 "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
1243 }, 1766 },
1767 "normalize-path": {
1768 "version": "3.0.0",
1769 "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
1770 "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
1771 "dev": true
1772 },
1244 "nth-check": { 1773 "nth-check": {
1245 "version": "1.0.2", 1774 "version": "1.0.2",
1246 "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", 1775 "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz",
@@ -1250,6 +1779,40 @@
1250 "boolbase": "~1.0.0" 1779 "boolbase": "~1.0.0"
1251 } 1780 }
1252 }, 1781 },
1782 "object-inspect": {
1783 "version": "1.7.0",
1784 "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
1785 "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==",
1786 "dev": true
1787 },
1788 "object-keys": {
1789 "version": "1.1.1",
1790 "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
1791 "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
1792 "dev": true
1793 },
1794 "object.assign": {
1795 "version": "4.1.0",
1796 "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
1797 "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
1798 "dev": true,
1799 "requires": {
1800 "define-properties": "^1.1.2",
1801 "function-bind": "^1.1.1",
1802 "has-symbols": "^1.0.0",
1803 "object-keys": "^1.0.11"
1804 }
1805 },
1806 "object.getownpropertydescriptors": {
1807 "version": "2.1.0",
1808 "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz",
1809 "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==",
1810 "dev": true,
1811 "requires": {
1812 "define-properties": "^1.1.3",
1813 "es-abstract": "^1.17.0-next.1"
1814 }
1815 },
1253 "once": { 1816 "once": {
1254 "version": "1.4.0", 1817 "version": "1.4.0",
1255 "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1818 "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -1269,17 +1832,17 @@
1269 } 1832 }
1270 }, 1833 },
1271 "optionator": { 1834 "optionator": {
1272 "version": "0.8.3", 1835 "version": "0.9.1",
1273 "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", 1836 "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
1274 "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", 1837 "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==",
1275 "dev": true, 1838 "dev": true,
1276 "requires": { 1839 "requires": {
1277 "deep-is": "~0.1.3", 1840 "deep-is": "^0.1.3",
1278 "fast-levenshtein": "~2.0.6", 1841 "fast-levenshtein": "^2.0.6",
1279 "levn": "~0.3.0", 1842 "levn": "^0.4.1",
1280 "prelude-ls": "~1.1.2", 1843 "prelude-ls": "^1.2.1",
1281 "type-check": "~0.3.2", 1844 "type-check": "^0.4.0",
1282 "word-wrap": "~1.2.3" 1845 "word-wrap": "^1.2.3"
1283 } 1846 }
1284 }, 1847 },
1285 "os": { 1848 "os": {
@@ -1310,6 +1873,30 @@
1310 "os-tmpdir": "^1.0.0" 1873 "os-tmpdir": "^1.0.0"
1311 } 1874 }
1312 }, 1875 },
1876 "p-limit": {
1877 "version": "2.3.0",
1878 "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
1879 "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
1880 "dev": true,
1881 "requires": {
1882 "p-try": "^2.0.0"
1883 }
1884 },
1885 "p-locate": {
1886 "version": "3.0.0",
1887 "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
1888 "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
1889 "dev": true,
1890 "requires": {
1891 "p-limit": "^2.0.0"
1892 }
1893 },
1894 "p-try": {
1895 "version": "2.2.0",
1896 "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
1897 "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
1898 "dev": true
1899 },
1313 "parent-module": { 1900 "parent-module": {
1314 "version": "1.0.1", 1901 "version": "1.0.1",
1315 "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", 1902 "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
@@ -1345,6 +1932,12 @@
1345 "@types/node": "*" 1932 "@types/node": "*"
1346 } 1933 }
1347 }, 1934 },
1935 "path-exists": {
1936 "version": "3.0.0",
1937 "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
1938 "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
1939 "dev": true
1940 },
1348 "path-is-absolute": { 1941 "path-is-absolute": {
1349 "version": "1.0.1", 1942 "version": "1.0.1",
1350 "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1943 "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
@@ -1352,9 +1945,9 @@
1352 "dev": true 1945 "dev": true
1353 }, 1946 },
1354 "path-key": { 1947 "path-key": {
1355 "version": "2.0.1", 1948 "version": "3.1.1",
1356 "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", 1949 "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
1357 "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", 1950 "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
1358 "dev": true 1951 "dev": true
1359 }, 1952 },
1360 "path-parse": { 1953 "path-parse": {
@@ -1376,9 +1969,9 @@
1376 "dev": true 1969 "dev": true
1377 }, 1970 },
1378 "prelude-ls": { 1971 "prelude-ls": {
1379 "version": "1.1.2", 1972 "version": "1.2.1",
1380 "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", 1973 "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
1381 "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", 1974 "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
1382 "dev": true 1975 "dev": true
1383 }, 1976 },
1384 "progress": { 1977 "progress": {
@@ -1419,16 +2012,37 @@
1419 "util-deprecate": "^1.0.1" 2012 "util-deprecate": "^1.0.1"
1420 } 2013 }
1421 }, 2014 },
2015 "readdirp": {
2016 "version": "3.2.0",
2017 "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz",
2018 "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==",
2019 "dev": true,
2020 "requires": {
2021 "picomatch": "^2.0.4"
2022 }
2023 },
1422 "regexpp": { 2024 "regexpp": {
1423 "version": "3.1.0", 2025 "version": "3.1.0",
1424 "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", 2026 "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz",
1425 "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", 2027 "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==",
1426 "dev": true 2028 "dev": true
1427 }, 2029 },
2030 "require-directory": {
2031 "version": "2.1.1",
2032 "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
2033 "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
2034 "dev": true
2035 },
2036 "require-main-filename": {
2037 "version": "2.0.0",
2038 "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
2039 "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
2040 "dev": true
2041 },
1428 "resolve": { 2042 "resolve": {
1429 "version": "1.16.1", 2043 "version": "1.17.0",
1430 "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.1.tgz", 2044 "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
1431 "integrity": "sha512-rmAglCSqWWMrrBv/XM6sW0NuRFiKViw/W4d9EbC4pt+49H8JwHy+mcGmALTEg504AUDcLTvb1T2q3E9AnmY+ig==", 2045 "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
1432 "dev": true, 2046 "dev": true,
1433 "requires": { 2047 "requires": {
1434 "path-parse": "^1.0.6" 2048 "path-parse": "^1.0.6"
@@ -1460,30 +2074,35 @@
1460 } 2074 }
1461 }, 2075 },
1462 "rollup": { 2076 "rollup": {
1463 "version": "2.10.0", 2077 "version": "2.10.9",
1464 "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.10.0.tgz", 2078 "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.10.9.tgz",
1465 "integrity": "sha512-7BmpEfUN9P6esJzWIn3DmR//90mW6YwYB1t3y48LpF8ITpYtL8s1kEirMKqUu44dVH/6a/rs0EuwYVL3FuRDoA==", 2079 "integrity": "sha512-dY/EbjiWC17ZCUSyk14hkxATAMAShkMsD43XmZGWjLrgFj15M3Dw2kEkA9ns64BiLFm9PKN6vTQw8neHwK74eg==",
1466 "dev": true, 2080 "dev": true,
1467 "requires": { 2081 "requires": {
1468 "fsevents": "~2.1.2" 2082 "fsevents": "~2.1.2"
1469 } 2083 }
1470 }, 2084 },
1471 "run-async": { 2085 "run-async": {
1472 "version": "2.4.0", 2086 "version": "2.4.1",
1473 "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", 2087 "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
1474 "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", 2088 "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==",
1475 "dev": true, 2089 "dev": true
1476 "requires": {
1477 "is-promise": "^2.1.0"
1478 }
1479 }, 2090 },
1480 "rxjs": { 2091 "rxjs": {
1481 "version": "6.5.4", 2092 "version": "6.5.5",
1482 "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", 2093 "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz",
1483 "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", 2094 "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==",
1484 "dev": true, 2095 "dev": true,
1485 "requires": { 2096 "requires": {
1486 "tslib": "^1.9.0" 2097 "tslib": "^1.9.0"
2098 },
2099 "dependencies": {
2100 "tslib": {
2101 "version": "1.13.0",
2102 "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
2103 "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==",
2104 "dev": true
2105 }
1487 } 2106 }
1488 }, 2107 },
1489 "safe-buffer": { 2108 "safe-buffer": {
@@ -1503,19 +2122,25 @@
1503 "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 2122 "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
1504 "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" 2123 "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
1505 }, 2124 },
2125 "set-blocking": {
2126 "version": "2.0.0",
2127 "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
2128 "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
2129 "dev": true
2130 },
1506 "shebang-command": { 2131 "shebang-command": {
1507 "version": "1.2.0", 2132 "version": "2.0.0",
1508 "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", 2133 "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
1509 "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", 2134 "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
1510 "dev": true, 2135 "dev": true,
1511 "requires": { 2136 "requires": {
1512 "shebang-regex": "^1.0.0" 2137 "shebang-regex": "^3.0.0"
1513 } 2138 }
1514 }, 2139 },
1515 "shebang-regex": { 2140 "shebang-regex": {
1516 "version": "1.0.0", 2141 "version": "3.0.0",
1517 "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", 2142 "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
1518 "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", 2143 "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
1519 "dev": true 2144 "dev": true
1520 }, 2145 },
1521 "sigmund": { 2146 "sigmund": {
@@ -1525,9 +2150,9 @@
1525 "dev": true 2150 "dev": true
1526 }, 2151 },
1527 "signal-exit": { 2152 "signal-exit": {
1528 "version": "3.0.2", 2153 "version": "3.0.3",
1529 "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", 2154 "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
1530 "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", 2155 "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
1531 "dev": true 2156 "dev": true
1532 }, 2157 },
1533 "slice-ansi": { 2158 "slice-ansi": {
@@ -1570,17 +2195,48 @@
1570 "emoji-regex": "^8.0.0", 2195 "emoji-regex": "^8.0.0",
1571 "is-fullwidth-code-point": "^3.0.0", 2196 "is-fullwidth-code-point": "^3.0.0",
1572 "strip-ansi": "^6.0.0" 2197 "strip-ansi": "^6.0.0"
1573 }, 2198 }
1574 "dependencies": { 2199 },
1575 "strip-ansi": { 2200 "string.prototype.trimend": {
1576 "version": "6.0.0", 2201 "version": "1.0.1",
1577 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 2202 "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz",
1578 "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 2203 "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==",
1579 "dev": true, 2204 "dev": true,
1580 "requires": { 2205 "requires": {
1581 "ansi-regex": "^5.0.0" 2206 "define-properties": "^1.1.3",
1582 } 2207 "es-abstract": "^1.17.5"
1583 } 2208 }
2209 },
2210 "string.prototype.trimleft": {
2211 "version": "2.1.2",
2212 "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz",
2213 "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==",
2214 "dev": true,
2215 "requires": {
2216 "define-properties": "^1.1.3",
2217 "es-abstract": "^1.17.5",
2218 "string.prototype.trimstart": "^1.0.0"
2219 }
2220 },
2221 "string.prototype.trimright": {
2222 "version": "2.1.2",
2223 "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz",
2224 "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==",
2225 "dev": true,
2226 "requires": {
2227 "define-properties": "^1.1.3",
2228 "es-abstract": "^1.17.5",
2229 "string.prototype.trimend": "^1.0.0"
2230 }
2231 },
2232 "string.prototype.trimstart": {
2233 "version": "1.0.1",
2234 "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz",
2235 "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==",
2236 "dev": true,
2237 "requires": {
2238 "define-properties": "^1.1.3",
2239 "es-abstract": "^1.17.5"
1584 } 2240 }
1585 }, 2241 },
1586 "string_decoder": { 2242 "string_decoder": {
@@ -1593,26 +2249,18 @@
1593 } 2249 }
1594 }, 2250 },
1595 "strip-ansi": { 2251 "strip-ansi": {
1596 "version": "5.2.0", 2252 "version": "6.0.0",
1597 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", 2253 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
1598 "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", 2254 "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
1599 "dev": true, 2255 "dev": true,
1600 "requires": { 2256 "requires": {
1601 "ansi-regex": "^4.1.0" 2257 "ansi-regex": "^5.0.0"
1602 },
1603 "dependencies": {
1604 "ansi-regex": {
1605 "version": "4.1.0",
1606 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
1607 "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
1608 "dev": true
1609 }
1610 } 2258 }
1611 }, 2259 },
1612 "strip-json-comments": { 2260 "strip-json-comments": {
1613 "version": "3.0.1", 2261 "version": "3.1.0",
1614 "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", 2262 "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz",
1615 "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", 2263 "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==",
1616 "dev": true 2264 "dev": true
1617 }, 2265 },
1618 "supports-color": { 2266 "supports-color": {
@@ -1636,6 +2284,12 @@
1636 "string-width": "^3.0.0" 2284 "string-width": "^3.0.0"
1637 }, 2285 },
1638 "dependencies": { 2286 "dependencies": {
2287 "ansi-regex": {
2288 "version": "4.1.0",
2289 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
2290 "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
2291 "dev": true
2292 },
1639 "emoji-regex": { 2293 "emoji-regex": {
1640 "version": "7.0.3", 2294 "version": "7.0.3",
1641 "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", 2295 "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
@@ -1658,6 +2312,15 @@
1658 "is-fullwidth-code-point": "^2.0.0", 2312 "is-fullwidth-code-point": "^2.0.0",
1659 "strip-ansi": "^5.1.0" 2313 "strip-ansi": "^5.1.0"
1660 } 2314 }
2315 },
2316 "strip-ansi": {
2317 "version": "5.2.0",
2318 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
2319 "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
2320 "dev": true,
2321 "requires": {
2322 "ansi-regex": "^4.1.0"
2323 }
1661 } 2324 }
1662 } 2325 }
1663 }, 2326 },
@@ -1692,9 +2355,9 @@
1692 } 2355 }
1693 }, 2356 },
1694 "tslib": { 2357 "tslib": {
1695 "version": "1.12.0", 2358 "version": "2.0.0",
1696 "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.12.0.tgz", 2359 "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz",
1697 "integrity": "sha512-5rxCQkP0kytf4H1T4xz1imjxaUUPMvc5aWp0rJ/VMIN7ClRiH1FwFvBt8wOeMasp/epeUnmSW6CixSIePtiLqA==", 2360 "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==",
1698 "dev": true 2361 "dev": true
1699 }, 2362 },
1700 "tsutils": { 2363 "tsutils": {
@@ -1704,6 +2367,14 @@
1704 "dev": true, 2367 "dev": true,
1705 "requires": { 2368 "requires": {
1706 "tslib": "^1.8.1" 2369 "tslib": "^1.8.1"
2370 },
2371 "dependencies": {
2372 "tslib": {
2373 "version": "1.13.0",
2374 "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
2375 "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==",
2376 "dev": true
2377 }
1707 } 2378 }
1708 }, 2379 },
1709 "tunnel": { 2380 "tunnel": {
@@ -1713,12 +2384,12 @@
1713 "dev": true 2384 "dev": true
1714 }, 2385 },
1715 "type-check": { 2386 "type-check": {
1716 "version": "0.3.2", 2387 "version": "0.4.0",
1717 "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", 2388 "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
1718 "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", 2389 "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
1719 "dev": true, 2390 "dev": true,
1720 "requires": { 2391 "requires": {
1721 "prelude-ls": "~1.1.2" 2392 "prelude-ls": "^1.2.1"
1722 } 2393 }
1723 }, 2394 },
1724 "type-fest": { 2395 "type-fest": {
@@ -1738,9 +2409,9 @@
1738 } 2409 }
1739 }, 2410 },
1740 "typescript": { 2411 "typescript": {
1741 "version": "3.9.2", 2412 "version": "3.9.3",
1742 "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.2.tgz", 2413 "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.3.tgz",
1743 "integrity": "sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw==", 2414 "integrity": "sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ==",
1744 "dev": true 2415 "dev": true
1745 }, 2416 },
1746 "typescript-formatter": { 2417 "typescript-formatter": {
@@ -1865,21 +2536,131 @@
1865 "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0-next.1.tgz", 2536 "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0-next.1.tgz",
1866 "integrity": "sha512-tZFUSbyjUcrh+qQf13ALX4QDdOfDX0cVaBFgy7ktJ0VwS7AW/yRKgGPSxVqqP9OCMNPdqP57O5q47w2pEwfaUg==" 2537 "integrity": "sha512-tZFUSbyjUcrh+qQf13ALX4QDdOfDX0cVaBFgy7ktJ0VwS7AW/yRKgGPSxVqqP9OCMNPdqP57O5q47w2pEwfaUg=="
1867 }, 2538 },
2539 "vscode-test": {
2540 "version": "1.3.0",
2541 "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-1.3.0.tgz",
2542 "integrity": "sha512-LddukcBiSU2FVTDr3c1D8lwkiOvwlJdDL2hqVbn6gIz+rpTqUCkMZSKYm94Y1v0WXlHSDQBsXyY+tchWQgGVsw==",
2543 "dev": true,
2544 "requires": {
2545 "http-proxy-agent": "^2.1.0",
2546 "https-proxy-agent": "^2.2.4",
2547 "rimraf": "^2.6.3"
2548 }
2549 },
1868 "which": { 2550 "which": {
1869 "version": "1.3.1", 2551 "version": "2.0.2",
1870 "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 2552 "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
1871 "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", 2553 "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
1872 "dev": true, 2554 "dev": true,
1873 "requires": { 2555 "requires": {
1874 "isexe": "^2.0.0" 2556 "isexe": "^2.0.0"
1875 } 2557 }
1876 }, 2558 },
2559 "which-module": {
2560 "version": "2.0.0",
2561 "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
2562 "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
2563 "dev": true
2564 },
2565 "wide-align": {
2566 "version": "1.1.3",
2567 "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
2568 "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
2569 "dev": true,
2570 "requires": {
2571 "string-width": "^1.0.2 || 2"
2572 },
2573 "dependencies": {
2574 "ansi-regex": {
2575 "version": "3.0.0",
2576 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
2577 "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
2578 "dev": true
2579 },
2580 "is-fullwidth-code-point": {
2581 "version": "2.0.0",
2582 "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
2583 "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
2584 "dev": true
2585 },
2586 "string-width": {
2587 "version": "2.1.1",
2588 "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
2589 "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
2590 "dev": true,
2591 "requires": {
2592 "is-fullwidth-code-point": "^2.0.0",
2593 "strip-ansi": "^4.0.0"
2594 }
2595 },
2596 "strip-ansi": {
2597 "version": "4.0.0",
2598 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
2599 "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
2600 "dev": true,
2601 "requires": {
2602 "ansi-regex": "^3.0.0"
2603 }
2604 }
2605 }
2606 },
1877 "word-wrap": { 2607 "word-wrap": {
1878 "version": "1.2.3", 2608 "version": "1.2.3",
1879 "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", 2609 "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
1880 "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", 2610 "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
1881 "dev": true 2611 "dev": true
1882 }, 2612 },
2613 "wrap-ansi": {
2614 "version": "5.1.0",
2615 "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
2616 "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
2617 "dev": true,
2618 "requires": {
2619 "ansi-styles": "^3.2.0",
2620 "string-width": "^3.0.0",
2621 "strip-ansi": "^5.0.0"
2622 },
2623 "dependencies": {
2624 "ansi-regex": {
2625 "version": "4.1.0",
2626 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
2627 "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
2628 "dev": true
2629 },
2630 "emoji-regex": {
2631 "version": "7.0.3",
2632 "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
2633 "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
2634 "dev": true
2635 },
2636 "is-fullwidth-code-point": {
2637 "version": "2.0.0",
2638 "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
2639 "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
2640 "dev": true
2641 },
2642 "string-width": {
2643 "version": "3.1.0",
2644 "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
2645 "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
2646 "dev": true,
2647 "requires": {
2648 "emoji-regex": "^7.0.1",
2649 "is-fullwidth-code-point": "^2.0.0",
2650 "strip-ansi": "^5.1.0"
2651 }
2652 },
2653 "strip-ansi": {
2654 "version": "5.2.0",
2655 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
2656 "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
2657 "dev": true,
2658 "requires": {
2659 "ansi-regex": "^4.1.0"
2660 }
2661 }
2662 }
2663 },
1883 "wrappy": { 2664 "wrappy": {
1884 "version": "1.0.2", 2665 "version": "1.0.2",
1885 "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 2666 "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
@@ -1895,12 +2676,97 @@
1895 "mkdirp": "^0.5.1" 2676 "mkdirp": "^0.5.1"
1896 } 2677 }
1897 }, 2678 },
2679 "y18n": {
2680 "version": "4.0.0",
2681 "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
2682 "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
2683 "dev": true
2684 },
1898 "yallist": { 2685 "yallist": {
1899 "version": "2.1.2", 2686 "version": "2.1.2",
1900 "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", 2687 "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
1901 "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", 2688 "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
1902 "dev": true 2689 "dev": true
1903 }, 2690 },
2691 "yargs": {
2692 "version": "13.3.2",
2693 "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
2694 "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
2695 "dev": true,
2696 "requires": {
2697 "cliui": "^5.0.0",
2698 "find-up": "^3.0.0",
2699 "get-caller-file": "^2.0.1",
2700 "require-directory": "^2.1.1",
2701 "require-main-filename": "^2.0.0",
2702 "set-blocking": "^2.0.0",
2703 "string-width": "^3.0.0",
2704 "which-module": "^2.0.0",
2705 "y18n": "^4.0.0",
2706 "yargs-parser": "^13.1.2"
2707 },
2708 "dependencies": {
2709 "ansi-regex": {
2710 "version": "4.1.0",
2711 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
2712 "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
2713 "dev": true
2714 },
2715 "emoji-regex": {
2716 "version": "7.0.3",
2717 "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
2718 "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
2719 "dev": true
2720 },
2721 "is-fullwidth-code-point": {
2722 "version": "2.0.0",
2723 "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
2724 "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
2725 "dev": true
2726 },
2727 "string-width": {
2728 "version": "3.1.0",
2729 "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
2730 "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
2731 "dev": true,
2732 "requires": {
2733 "emoji-regex": "^7.0.1",
2734 "is-fullwidth-code-point": "^2.0.0",
2735 "strip-ansi": "^5.1.0"
2736 }
2737 },
2738 "strip-ansi": {
2739 "version": "5.2.0",
2740 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
2741 "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
2742 "dev": true,
2743 "requires": {
2744 "ansi-regex": "^4.1.0"
2745 }
2746 }
2747 }
2748 },
2749 "yargs-parser": {
2750 "version": "13.1.2",
2751 "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
2752 "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
2753 "dev": true,
2754 "requires": {
2755 "camelcase": "^5.0.0",
2756 "decamelize": "^1.2.0"
2757 }
2758 },
2759 "yargs-unparser": {
2760 "version": "1.6.0",
2761 "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz",
2762 "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==",
2763 "dev": true,
2764 "requires": {
2765 "flat": "^4.1.0",
2766 "lodash": "^4.17.15",
2767 "yargs": "^13.3.0"
2768 }
2769 },
1904 "yauzl": { 2770 "yauzl": {
1905 "version": "2.10.0", 2771 "version": "2.10.0",
1906 "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", 2772 "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
diff --git a/editors/code/package.json b/editors/code/package.json
index 78f647baa..75dbafc05 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -21,7 +21,7 @@
21 "Programming Languages" 21 "Programming Languages"
22 ], 22 ],
23 "engines": { 23 "engines": {
24 "vscode": "^1.44.0" 24 "vscode": "^1.44.1"
25 }, 25 },
26 "enableProposedApi": true, 26 "enableProposedApi": true,
27 "scripts": { 27 "scripts": {
@@ -29,27 +29,34 @@
29 "package": "vsce package -o rust-analyzer.vsix", 29 "package": "vsce package -o rust-analyzer.vsix",
30 "build": "tsc", 30 "build": "tsc",
31 "watch": "tsc --watch", 31 "watch": "tsc --watch",
32 "lint": "tsfmt --verify && eslint -c .eslintrc.js --ext ts ./src", 32 "lint": "tsfmt --verify && eslint -c .eslintrc.js --ext ts ./src ./tests",
33 "fix": " tsfmt -r && eslint -c .eslintrc.js --ext ts ./src --fix" 33 "fix": " tsfmt -r && eslint -c .eslintrc.js --ext ts ./src ./tests --fix",
34 "pretest": "npm run build",
35 "test": "node ./out/tests/runTests.js"
34 }, 36 },
35 "dependencies": { 37 "dependencies": {
36 "node-fetch": "^2.6.0", 38 "node-fetch": "^2.6.0",
37 "vscode-languageclient": "7.0.0-next.1" 39 "vscode-languageclient": "7.0.0-next.1"
38 }, 40 },
39 "devDependencies": { 41 "devDependencies": {
40 "@rollup/plugin-commonjs": "^11.1.0", 42 "@rollup/plugin-commonjs": "^12.0.0",
41 "@rollup/plugin-node-resolve": "^7.1.3", 43 "@rollup/plugin-node-resolve": "^8.0.0",
42 "@types/node": "^12.12.39", 44 "@types/glob": "^7.1.1",
45 "@types/mocha": "^7.0.2",
46 "@types/node": "^14.0.5",
43 "@types/node-fetch": "^2.5.7", 47 "@types/node-fetch": "^2.5.7",
44 "@types/vscode": "^1.44.0", 48 "@types/vscode": "^1.44.1",
45 "@typescript-eslint/eslint-plugin": "^2.33.0", 49 "@typescript-eslint/eslint-plugin": "^3.0.0",
46 "@typescript-eslint/parser": "^2.33.0", 50 "@typescript-eslint/parser": "^3.0.0",
47 "eslint": "^6.8.0", 51 "eslint": "^7.0.0",
48 "rollup": "^2.10.0", 52 "glob": "^7.1.6",
49 "tslib": "^1.12.0", 53 "mocha": "^7.1.2",
50 "typescript": "^3.9.2", 54 "rollup": "^2.10.7",
55 "tslib": "^2.0.0",
56 "typescript": "^3.9.3",
51 "typescript-formatter": "^7.2.2", 57 "typescript-formatter": "^7.2.2",
52 "vsce": "^1.75.0" 58 "vsce": "^1.75.0",
59 "vscode-test": "^1.3.0"
53 }, 60 },
54 "activationEvents": [ 61 "activationEvents": [
55 "onLanguage:rust", 62 "onLanguage:rust",
@@ -57,7 +64,7 @@
57 "onCommand:rust-analyzer.collectGarbage", 64 "onCommand:rust-analyzer.collectGarbage",
58 "workspaceContains:**/Cargo.toml" 65 "workspaceContains:**/Cargo.toml"
59 ], 66 ],
60 "main": "./out/main", 67 "main": "./out/src/main",
61 "contributes": { 68 "contributes": {
62 "taskDefinitions": [ 69 "taskDefinitions": [
63 { 70 {
@@ -159,6 +166,11 @@
159 "command": "rust-analyzer.serverVersion", 166 "command": "rust-analyzer.serverVersion",
160 "title": "Show RA Version", 167 "title": "Show RA Version",
161 "category": "Rust Analyzer" 168 "category": "Rust Analyzer"
169 },
170 {
171 "command": "rust-analyzer.toggleInlayHints",
172 "title": "Toggle inlay hints",
173 "category": "Rust Analyzer"
162 } 174 }
163 ], 175 ],
164 "keybindings": [ 176 "keybindings": [
@@ -575,6 +587,11 @@
575 "description": "Style for attributes" 587 "description": "Style for attributes"
576 }, 588 },
577 { 589 {
590 "id": "boolean",
591 "description": "Style for boolean literals",
592 "superType": "keyword"
593 },
594 {
578 "id": "builtinType", 595 "id": "builtinType",
579 "description": "Style for builtin types", 596 "description": "Style for builtin types",
580 "superType": "type" 597 "superType": "type"
@@ -584,6 +601,11 @@
584 "description": "Style for lifetimes" 601 "description": "Style for lifetimes"
585 }, 602 },
586 { 603 {
604 "id": "selfKeyword",
605 "description": "Style for the self keyword",
606 "superType": "keyword"
607 },
608 {
587 "id": "typeAlias", 609 "id": "typeAlias",
588 "description": "Style for type aliases", 610 "description": "Style for type aliases",
589 "superType": "type" 611 "superType": "type"
@@ -604,6 +626,10 @@
604 ], 626 ],
605 "semanticTokenModifiers": [ 627 "semanticTokenModifiers": [
606 { 628 {
629 "id": "attribute",
630 "description": "Style for elements within attributes"
631 },
632 {
607 "id": "constant", 633 "id": "constant",
608 "description": "Style for compile-time constants" 634 "description": "Style for compile-time constants"
609 }, 635 },
@@ -630,6 +656,12 @@
630 "attribute": [ 656 "attribute": [
631 "meta.attribute.rust" 657 "meta.attribute.rust"
632 ], 658 ],
659 "function.attribute": [
660 "entity.name.function.attribute.rust"
661 ],
662 "boolean": [
663 "constant.language.boolean.rust"
664 ],
633 "builtinType": [ 665 "builtinType": [
634 "support.type.primitive.rust" 666 "support.type.primitive.rust"
635 ], 667 ],
@@ -662,6 +694,70 @@
662 ] 694 ]
663 } 695 }
664 } 696 }
665 ] 697 ],
698 "menus": {
699 "commandPalette": [
700 {
701 "command": "rust-analyzer.syntaxTree",
702 "when": "inRustProject"
703 },
704 {
705 "command": "rust-analyzer.expandMacro",
706 "when": "inRustProject"
707 },
708 {
709 "command": "rust-analyzer.matchingBrace",
710 "when": "inRustProject"
711 },
712 {
713 "command": "rust-analyzer.parentModule",
714 "when": "inRustProject"
715 },
716 {
717 "command": "rust-analyzer.joinLines",
718 "when": "inRustProject"
719 },
720 {
721 "command": "rust-analyzer.run",
722 "when": "inRustProject"
723 },
724 {
725 "command": "rust-analyzer.debug",
726 "when": "inRustProject"
727 },
728 {
729 "command": "rust-analyzer.newDebugConfig",
730 "when": "inRustProject"
731 },
732 {
733 "command": "rust-analyzer.analyzerStatus",
734 "when": "inRustProject"
735 },
736 {
737 "command": "rust-analyzer.collectGarbage",
738 "when": "inRustProject"
739 },
740 {
741 "command": "rust-analyzer.reload",
742 "when": "inRustProject"
743 },
744 {
745 "command": "rust-analyzer.onEnter",
746 "when": "inRustProject"
747 },
748 {
749 "command": "rust-analyzer.ssr",
750 "when": "inRustProject"
751 },
752 {
753 "command": "rust-analyzer.serverVersion",
754 "when": "inRustProject"
755 },
756 {
757 "command": "rust-analyzer.toggleInlayHints",
758 "when": "inRustProject"
759 }
760 ]
761 }
666 } 762 }
667} 763}
diff --git a/editors/code/rollup.config.js b/editors/code/rollup.config.js
index 2ca27694d..58360eabb 100644
--- a/editors/code/rollup.config.js
+++ b/editors/code/rollup.config.js
@@ -6,7 +6,7 @@ import nodeBuiltins from 'builtin-modules';
6 6
7/** @type { import('rollup').RollupOptions } */ 7/** @type { import('rollup').RollupOptions } */
8export default { 8export default {
9 input: 'out/main.js', 9 input: 'out/src/main.js',
10 plugins: [ 10 plugins: [
11 resolve({ 11 resolve({
12 preferBuiltins: true 12 preferBuiltins: true
@@ -20,7 +20,7 @@ export default {
20 ], 20 ],
21 external: [...nodeBuiltins, 'vscode'], 21 external: [...nodeBuiltins, 'vscode'],
22 output: { 22 output: {
23 file: './out/main.js', 23 file: './out/src/main.js',
24 format: 'cjs', 24 format: 'cjs',
25 exports: 'named' 25 exports: 'named'
26 } 26 }
diff --git a/editors/code/rust.tmGrammar.json b/editors/code/rust.tmGrammar.json
index aa0811326..ab87cd39f 100644
--- a/editors/code/rust.tmGrammar.json
+++ b/editors/code/rust.tmGrammar.json
@@ -75,8 +75,13 @@
75 { 75 {
76 "comment": "Attribute", 76 "comment": "Attribute",
77 "name": "meta.attribute.rust", 77 "name": "meta.attribute.rust",
78 "begin": "#\\!?\\[", 78 "begin": "#\\!?\\[(\\w*)",
79 "end": "\\]", 79 "end": "\\]",
80 "captures": {
81 "1": {
82 "name": "entity.name.function.attribute.rust"
83 }
84 },
80 "patterns": [ 85 "patterns": [
81 { 86 {
82 "include": "#string_literal" 87 "include": "#string_literal"
@@ -202,7 +207,7 @@
202 { 207 {
203 "comment": "Miscellaneous operator", 208 "comment": "Miscellaneous operator",
204 "name": "keyword.operator.misc.rust", 209 "name": "keyword.operator.misc.rust",
205 "match": "(=>|::)" 210 "match": "(=>|::|\\?)"
206 }, 211 },
207 { 212 {
208 "comment": "Comparison operator", 213 "comment": "Comparison operator",
diff --git a/editors/code/src/commands/syntax_tree.ts b/editors/code/src/ast_inspector.ts
index a5446c327..4fdd167bd 100644
--- a/editors/code/src/commands/syntax_tree.ts
+++ b/editors/code/src/ast_inspector.ts
@@ -1,93 +1,15 @@
1import * as vscode from 'vscode'; 1import * as vscode from 'vscode';
2import * as ra from '../rust-analyzer-api';
3
4import { Ctx, Cmd, Disposable } from '../ctx';
5import { isRustDocument, RustEditor, isRustEditor, sleep } from '../util';
6
7const AST_FILE_SCHEME = "rust-analyzer";
8
9// Opens the virtual file that will show the syntax tree
10//
11// The contents of the file come from the `TextDocumentContentProvider`
12export function syntaxTree(ctx: Ctx): Cmd {
13 const tdcp = new TextDocumentContentProvider(ctx);
14
15 void new AstInspector(ctx);
16
17 ctx.pushCleanup(vscode.workspace.registerTextDocumentContentProvider(AST_FILE_SCHEME, tdcp));
18 ctx.pushCleanup(vscode.languages.setLanguageConfiguration("ra_syntax_tree", {
19 brackets: [["[", ")"]],
20 }));
21
22 return async () => {
23 const editor = vscode.window.activeTextEditor;
24 const rangeEnabled = !!editor && !editor.selection.isEmpty;
25
26 const uri = rangeEnabled
27 ? vscode.Uri.parse(`${tdcp.uri.toString()}?range=true`)
28 : tdcp.uri;
29
30 const document = await vscode.workspace.openTextDocument(uri);
31
32 tdcp.eventEmitter.fire(uri);
33
34 void await vscode.window.showTextDocument(document, {
35 viewColumn: vscode.ViewColumn.Two,
36 preserveFocus: true
37 });
38 };
39}
40
41class TextDocumentContentProvider implements vscode.TextDocumentContentProvider {
42 readonly uri = vscode.Uri.parse('rust-analyzer://syntaxtree/tree.rast');
43 readonly eventEmitter = new vscode.EventEmitter<vscode.Uri>();
44
45
46 constructor(private readonly ctx: Ctx) {
47 vscode.workspace.onDidChangeTextDocument(this.onDidChangeTextDocument, this, ctx.subscriptions);
48 vscode.window.onDidChangeActiveTextEditor(this.onDidChangeActiveTextEditor, this, ctx.subscriptions);
49 }
50
51 private onDidChangeTextDocument(event: vscode.TextDocumentChangeEvent) {
52 if (isRustDocument(event.document)) {
53 // We need to order this after language server updates, but there's no API for that.
54 // Hence, good old sleep().
55 void sleep(10).then(() => this.eventEmitter.fire(this.uri));
56 }
57 }
58 private onDidChangeActiveTextEditor(editor: vscode.TextEditor | undefined) {
59 if (editor && isRustEditor(editor)) {
60 this.eventEmitter.fire(this.uri);
61 }
62 }
63
64 provideTextDocumentContent(uri: vscode.Uri, ct: vscode.CancellationToken): vscode.ProviderResult<string> {
65 const rustEditor = this.ctx.activeRustEditor;
66 if (!rustEditor) return '';
67
68 // When the range based query is enabled we take the range of the selection
69 const range = uri.query === 'range=true' && !rustEditor.selection.isEmpty
70 ? this.ctx.client.code2ProtocolConverter.asRange(rustEditor.selection)
71 : null;
72
73 const params = { textDocument: { uri: rustEditor.document.uri.toString() }, range, };
74 return this.ctx.client.sendRequest(ra.syntaxTree, params, ct);
75 }
76
77 get onDidChange(): vscode.Event<vscode.Uri> {
78 return this.eventEmitter.event;
79 }
80}
81 2
3import { Ctx, Disposable } from './ctx';
4import { RustEditor, isRustEditor } from './util';
82 5
83// FIXME: consider implementing this via the Tree View API? 6// FIXME: consider implementing this via the Tree View API?
84// https://code.visualstudio.com/api/extension-guides/tree-view 7// https://code.visualstudio.com/api/extension-guides/tree-view
85class AstInspector implements vscode.HoverProvider, vscode.DefinitionProvider, Disposable { 8export class AstInspector implements vscode.HoverProvider, vscode.DefinitionProvider, Disposable {
86 private readonly astDecorationType = vscode.window.createTextEditorDecorationType({ 9 private readonly astDecorationType = vscode.window.createTextEditorDecorationType({
87 borderColor: new vscode.ThemeColor('rust_analyzer.syntaxTreeBorder'), 10 borderColor: new vscode.ThemeColor('rust_analyzer.syntaxTreeBorder'),
88 borderStyle: "solid", 11 borderStyle: "solid",
89 borderWidth: "2px", 12 borderWidth: "2px",
90
91 }); 13 });
92 private rustEditor: undefined | RustEditor; 14 private rustEditor: undefined | RustEditor;
93 15
@@ -113,7 +35,7 @@ class AstInspector implements vscode.HoverProvider, vscode.DefinitionProvider, D
113 }); 35 });
114 36
115 constructor(ctx: Ctx) { 37 constructor(ctx: Ctx) {
116 ctx.pushCleanup(vscode.languages.registerHoverProvider({ scheme: AST_FILE_SCHEME }, this)); 38 ctx.pushCleanup(vscode.languages.registerHoverProvider({ scheme: 'rust-analyzer' }, this));
117 ctx.pushCleanup(vscode.languages.registerDefinitionProvider({ language: "rust" }, this)); 39 ctx.pushCleanup(vscode.languages.registerDefinitionProvider({ language: "rust" }, this));
118 vscode.workspace.onDidCloseTextDocument(this.onDidCloseTextDocument, this, ctx.subscriptions); 40 vscode.workspace.onDidCloseTextDocument(this.onDidCloseTextDocument, this, ctx.subscriptions);
119 vscode.workspace.onDidChangeTextDocument(this.onDidChangeTextDocument, this, ctx.subscriptions); 41 vscode.workspace.onDidChangeTextDocument(this.onDidChangeTextDocument, this, ctx.subscriptions);
@@ -146,7 +68,7 @@ class AstInspector implements vscode.HoverProvider, vscode.DefinitionProvider, D
146 } 68 }
147 69
148 private findAstTextEditor(): undefined | vscode.TextEditor { 70 private findAstTextEditor(): undefined | vscode.TextEditor {
149 return vscode.window.visibleTextEditors.find(it => it.document.uri.scheme === AST_FILE_SCHEME); 71 return vscode.window.visibleTextEditors.find(it => it.document.uri.scheme === 'rust-analyzer');
150 } 72 }
151 73
152 private setRustEditor(newRustEditor: undefined | RustEditor) { 74 private setRustEditor(newRustEditor: undefined | RustEditor) {
diff --git a/editors/code/src/cargo.ts b/editors/code/src/cargo.ts
index 6a41873d0..a55b2f860 100644
--- a/editors/code/src/cargo.ts
+++ b/editors/code/src/cargo.ts
@@ -12,14 +12,44 @@ interface CompilationArtifact {
12 isTest: boolean; 12 isTest: boolean;
13} 13}
14 14
15export interface ArtifactSpec {
16 cargoArgs: string[];
17 filter?: (artifacts: CompilationArtifact[]) => CompilationArtifact[];
18}
19
20export function artifactSpec(args: readonly string[]): ArtifactSpec {
21 const cargoArgs = [...args, "--message-format=json"];
22
23 // arguments for a runnable from the quick pick should be updated.
24 // see crates\rust-analyzer\src\main_loop\handlers.rs, handle_code_lens
25 switch (cargoArgs[0]) {
26 case "run": cargoArgs[0] = "build"; break;
27 case "test": {
28 if (!cargoArgs.includes("--no-run")) {
29 cargoArgs.push("--no-run");
30 }
31 break;
32 }
33 }
34
35 const result: ArtifactSpec = { cargoArgs: cargoArgs };
36 if (cargoArgs[0] === "test") {
37 // for instance, `crates\rust-analyzer\tests\heavy_tests\main.rs` tests
38 // produce 2 artifacts: {"kind": "bin"} and {"kind": "test"}
39 result.filter = (artifacts) => artifacts.filter(it => it.isTest);
40 }
41
42 return result;
43}
44
15export class Cargo { 45export class Cargo {
16 constructor(readonly rootFolder: string, readonly output: OutputChannel) { } 46 constructor(readonly rootFolder: string, readonly output: OutputChannel) { }
17 47
18 private async artifactsFromArgs(cargoArgs: string[]): Promise<CompilationArtifact[]> { 48 private async getArtifacts(spec: ArtifactSpec): Promise<CompilationArtifact[]> {
19 const artifacts: CompilationArtifact[] = []; 49 const artifacts: CompilationArtifact[] = [];
20 50
21 try { 51 try {
22 await this.runCargo(cargoArgs, 52 await this.runCargo(spec.cargoArgs,
23 message => { 53 message => {
24 if (message.reason === 'compiler-artifact' && message.executable) { 54 if (message.reason === 'compiler-artifact' && message.executable) {
25 const isBinary = message.target.crate_types.includes('bin'); 55 const isBinary = message.target.crate_types.includes('bin');
@@ -43,30 +73,11 @@ export class Cargo {
43 throw new Error(`Cargo invocation has failed: ${err}`); 73 throw new Error(`Cargo invocation has failed: ${err}`);
44 } 74 }
45 75
46 return artifacts; 76 return spec.filter?.(artifacts) ?? artifacts;
47 } 77 }
48 78
49 async executableFromArgs(args: readonly string[]): Promise<string> { 79 async executableFromArgs(args: readonly string[]): Promise<string> {
50 const cargoArgs = [...args, "--message-format=json"]; 80 const artifacts = await this.getArtifacts(artifactSpec(args));
51
52 // arguments for a runnable from the quick pick should be updated.
53 // see crates\rust-analyzer\src\main_loop\handlers.rs, handle_code_lens
54 switch (cargoArgs[0]) {
55 case "run": cargoArgs[0] = "build"; break;
56 case "test": {
57 if (cargoArgs.indexOf("--no-run") === -1) {
58 cargoArgs.push("--no-run");
59 }
60 break;
61 }
62 }
63
64 let artifacts = await this.artifactsFromArgs(cargoArgs);
65 if (cargoArgs[0] === "test") {
66 // for instance, `crates\rust-analyzer\tests\heavy_tests\main.rs` tests
67 // produce 2 artifacts: {"kind": "bin"} and {"kind": "test"}
68 artifacts = artifacts.filter(a => a.isTest);
69 }
70 81
71 if (artifacts.length === 0) { 82 if (artifacts.length === 0) {
72 throw new Error('No compilation artifacts'); 83 throw new Error('No compilation artifacts');
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts
index fac1a0be3..d64f9a3f9 100644
--- a/editors/code/src/client.ts
+++ b/editors/code/src/client.ts
@@ -41,10 +41,12 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient
41 return client.sendRequest(lc.CodeActionRequest.type, params, token).then((values) => { 41 return client.sendRequest(lc.CodeActionRequest.type, params, token).then((values) => {
42 if (values === null) return undefined; 42 if (values === null) return undefined;
43 const result: (vscode.CodeAction | vscode.Command)[] = []; 43 const result: (vscode.CodeAction | vscode.Command)[] = [];
44 const groups = new Map<string, { index: number; items: vscode.CodeAction[] }>();
44 for (const item of values) { 45 for (const item of values) {
45 if (lc.CodeAction.is(item)) { 46 if (lc.CodeAction.is(item)) {
46 const action = client.protocol2CodeConverter.asCodeAction(item); 47 const action = client.protocol2CodeConverter.asCodeAction(item);
47 if (isSnippetEdit(item)) { 48 const group = actionGroup(item);
49 if (isSnippetEdit(item) || group) {
48 action.command = { 50 action.command = {
49 command: "rust-analyzer.applySnippetWorkspaceEdit", 51 command: "rust-analyzer.applySnippetWorkspaceEdit",
50 title: "", 52 title: "",
@@ -52,12 +54,38 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient
52 }; 54 };
53 action.edit = undefined; 55 action.edit = undefined;
54 } 56 }
55 result.push(action); 57
58 if (group) {
59 let entry = groups.get(group);
60 if (!entry) {
61 entry = { index: result.length, items: [] };
62 groups.set(group, entry);
63 result.push(action);
64 }
65 entry.items.push(action);
66 } else {
67 result.push(action);
68 }
56 } else { 69 } else {
57 const command = client.protocol2CodeConverter.asCommand(item); 70 const command = client.protocol2CodeConverter.asCommand(item);
58 result.push(command); 71 result.push(command);
59 } 72 }
60 } 73 }
74 for (const [group, { index, items }] of groups) {
75 if (items.length === 1) {
76 result[index] = items[0];
77 } else {
78 const action = new vscode.CodeAction(group);
79 action.command = {
80 command: "rust-analyzer.applyActionGroup",
81 title: "",
82 arguments: [items.map((item) => {
83 return { label: item.title, edit: item.command!!.arguments!![0] };
84 })],
85 };
86 result[index] = action;
87 }
88 }
61 return result; 89 return result;
62 }, 90 },
63 (_error) => undefined 91 (_error) => undefined
@@ -81,15 +109,16 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient
81 // implementations are still in the "proposed" category for 3.16. 109 // implementations are still in the "proposed" category for 3.16.
82 client.registerFeature(new CallHierarchyFeature(client)); 110 client.registerFeature(new CallHierarchyFeature(client));
83 client.registerFeature(new SemanticTokensFeature(client)); 111 client.registerFeature(new SemanticTokensFeature(client));
84 client.registerFeature(new SnippetTextEditFeature()); 112 client.registerFeature(new ExperimentalFeatures());
85 113
86 return client; 114 return client;
87} 115}
88 116
89class SnippetTextEditFeature implements lc.StaticFeature { 117class ExperimentalFeatures implements lc.StaticFeature {
90 fillClientCapabilities(capabilities: lc.ClientCapabilities): void { 118 fillClientCapabilities(capabilities: lc.ClientCapabilities): void {
91 const caps: any = capabilities.experimental ?? {}; 119 const caps: any = capabilities.experimental ?? {};
92 caps.snippetTextEdit = true; 120 caps.snippetTextEdit = true;
121 caps.codeActionGroup = true;
93 capabilities.experimental = caps; 122 capabilities.experimental = caps;
94 } 123 }
95 initialize(_capabilities: lc.ServerCapabilities<any>, _documentSelector: lc.DocumentSelector | undefined): void { 124 initialize(_capabilities: lc.ServerCapabilities<any>, _documentSelector: lc.DocumentSelector | undefined): void {
@@ -107,3 +136,7 @@ function isSnippetEdit(action: lc.CodeAction): boolean {
107 } 136 }
108 return false; 137 return false;
109} 138}
139
140function actionGroup(action: lc.CodeAction): string | undefined {
141 return (action as any).group;
142}
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts
new file mode 100644
index 000000000..86302db37
--- /dev/null
+++ b/editors/code/src/commands.ts
@@ -0,0 +1,370 @@
1import * as vscode from 'vscode';
2import * as lc from 'vscode-languageclient';
3import * as ra from './lsp_ext';
4
5import { Ctx, Cmd } from './ctx';
6import { applySnippetWorkspaceEdit, applySnippetTextEdits } from './snippets';
7import { spawnSync } from 'child_process';
8import { RunnableQuickPick, selectRunnable, createTask } from './run';
9import { AstInspector } from './ast_inspector';
10import { isRustDocument, sleep, isRustEditor } from './util';
11
12export * from './ast_inspector';
13export * from './run';
14
15export function analyzerStatus(ctx: Ctx): Cmd {
16 const tdcp = new class implements vscode.TextDocumentContentProvider {
17 readonly uri = vscode.Uri.parse('rust-analyzer-status://status');
18 readonly eventEmitter = new vscode.EventEmitter<vscode.Uri>();
19
20 provideTextDocumentContent(_uri: vscode.Uri): vscode.ProviderResult<string> {
21 if (!vscode.window.activeTextEditor) return '';
22
23 return ctx.client.sendRequest(ra.analyzerStatus, null);
24 }
25
26 get onDidChange(): vscode.Event<vscode.Uri> {
27 return this.eventEmitter.event;
28 }
29 }();
30
31 let poller: NodeJS.Timer | undefined = undefined;
32
33 ctx.pushCleanup(
34 vscode.workspace.registerTextDocumentContentProvider(
35 'rust-analyzer-status',
36 tdcp,
37 ),
38 );
39
40 ctx.pushCleanup({
41 dispose() {
42 if (poller !== undefined) {
43 clearInterval(poller);
44 }
45 },
46 });
47
48 return async () => {
49 if (poller === undefined) {
50 poller = setInterval(() => tdcp.eventEmitter.fire(tdcp.uri), 1000);
51 }
52 const document = await vscode.workspace.openTextDocument(tdcp.uri);
53 return vscode.window.showTextDocument(document, vscode.ViewColumn.Two, true);
54 };
55}
56
57export function matchingBrace(ctx: Ctx): Cmd {
58 return async () => {
59 const editor = ctx.activeRustEditor;
60 const client = ctx.client;
61 if (!editor || !client) return;
62
63 const response = await client.sendRequest(ra.matchingBrace, {
64 textDocument: { uri: editor.document.uri.toString() },
65 positions: editor.selections.map(s =>
66 client.code2ProtocolConverter.asPosition(s.active),
67 ),
68 });
69 editor.selections = editor.selections.map((sel, idx) => {
70 const active = client.protocol2CodeConverter.asPosition(
71 response[idx],
72 );
73 const anchor = sel.isEmpty ? active : sel.anchor;
74 return new vscode.Selection(anchor, active);
75 });
76 editor.revealRange(editor.selection);
77 };
78}
79
80export function joinLines(ctx: Ctx): Cmd {
81 return async () => {
82 const editor = ctx.activeRustEditor;
83 const client = ctx.client;
84 if (!editor || !client) return;
85
86 const items: lc.TextEdit[] = await client.sendRequest(ra.joinLines, {
87 ranges: editor.selections.map((it) => client.code2ProtocolConverter.asRange(it)),
88 textDocument: { uri: editor.document.uri.toString() },
89 });
90 editor.edit((builder) => {
91 client.protocol2CodeConverter.asTextEdits(items).forEach((edit) => {
92 builder.replace(edit.range, edit.newText);
93 });
94 });
95 };
96}
97
98export function onEnter(ctx: Ctx): Cmd {
99 async function handleKeypress() {
100 const editor = ctx.activeRustEditor;
101 const client = ctx.client;
102
103 if (!editor || !client) return false;
104
105 const lcEdits = await client.sendRequest(ra.onEnter, {
106 textDocument: { uri: editor.document.uri.toString() },
107 position: client.code2ProtocolConverter.asPosition(
108 editor.selection.active,
109 ),
110 }).catch(_error => {
111 // client.logFailedRequest(OnEnterRequest.type, error);
112 return null;
113 });
114 if (!lcEdits) return false;
115
116 const edits = client.protocol2CodeConverter.asTextEdits(lcEdits);
117 await applySnippetTextEdits(editor, edits);
118 return true;
119 }
120
121 return async () => {
122 if (await handleKeypress()) return;
123
124 await vscode.commands.executeCommand('default:type', { text: '\n' });
125 };
126}
127
128export function parentModule(ctx: Ctx): Cmd {
129 return async () => {
130 const editor = ctx.activeRustEditor;
131 const client = ctx.client;
132 if (!editor || !client) return;
133
134 const response = await client.sendRequest(ra.parentModule, {
135 textDocument: { uri: editor.document.uri.toString() },
136 position: client.code2ProtocolConverter.asPosition(
137 editor.selection.active,
138 ),
139 });
140 const loc = response[0];
141 if (!loc) return;
142
143 const uri = client.protocol2CodeConverter.asUri(loc.targetUri);
144 const range = client.protocol2CodeConverter.asRange(loc.targetRange);
145
146 const doc = await vscode.workspace.openTextDocument(uri);
147 const e = await vscode.window.showTextDocument(doc);
148 e.selection = new vscode.Selection(range.start, range.start);
149 e.revealRange(range, vscode.TextEditorRevealType.InCenter);
150 };
151}
152
153export function ssr(ctx: Ctx): Cmd {
154 return async () => {
155 const client = ctx.client;
156 if (!client) return;
157
158 const options: vscode.InputBoxOptions = {
159 value: "() ==>> ()",
160 prompt: "Enter request, for example 'Foo($a:expr) ==> Foo::new($a)' ",
161 validateInput: async (x: string) => {
162 try {
163 await client.sendRequest(ra.ssr, { query: x, parseOnly: true });
164 } catch (e) {
165 return e.toString();
166 }
167 return null;
168 }
169 };
170 const request = await vscode.window.showInputBox(options);
171 if (!request) return;
172
173 const edit = await client.sendRequest(ra.ssr, { query: request, parseOnly: false });
174
175 await vscode.workspace.applyEdit(client.protocol2CodeConverter.asWorkspaceEdit(edit));
176 };
177}
178
179export function serverVersion(ctx: Ctx): Cmd {
180 return async () => {
181 const { stdout } = spawnSync(ctx.serverPath, ["--version"], { encoding: "utf8" });
182 const commitHash = stdout.slice(`rust-analyzer `.length).trim();
183 const { releaseTag } = ctx.config.package;
184
185 void vscode.window.showInformationMessage(
186 `rust-analyzer version: ${releaseTag ?? "unreleased"} (${commitHash})`
187 );
188 };
189}
190
191export function toggleInlayHints(ctx: Ctx): Cmd {
192 return async () => {
193 await vscode
194 .workspace
195 .getConfiguration(`${ctx.config.rootSection}.inlayHints`)
196 .update('enable', !ctx.config.inlayHints.enable, vscode.ConfigurationTarget.Workspace);
197 };
198}
199
200export function run(ctx: Ctx): Cmd {
201 let prevRunnable: RunnableQuickPick | undefined;
202
203 return async () => {
204 const item = await selectRunnable(ctx, prevRunnable);
205 if (!item) return;
206
207 item.detail = 'rerun';
208 prevRunnable = item;
209 const task = createTask(item.runnable);
210 return await vscode.tasks.executeTask(task);
211 };
212}
213
214// Opens the virtual file that will show the syntax tree
215//
216// The contents of the file come from the `TextDocumentContentProvider`
217export function syntaxTree(ctx: Ctx): Cmd {
218 const tdcp = new class implements vscode.TextDocumentContentProvider {
219 readonly uri = vscode.Uri.parse('rust-analyzer://syntaxtree/tree.rast');
220 readonly eventEmitter = new vscode.EventEmitter<vscode.Uri>();
221 constructor() {
222 vscode.workspace.onDidChangeTextDocument(this.onDidChangeTextDocument, this, ctx.subscriptions);
223 vscode.window.onDidChangeActiveTextEditor(this.onDidChangeActiveTextEditor, this, ctx.subscriptions);
224 }
225
226 private onDidChangeTextDocument(event: vscode.TextDocumentChangeEvent) {
227 if (isRustDocument(event.document)) {
228 // We need to order this after language server updates, but there's no API for that.
229 // Hence, good old sleep().
230 void sleep(10).then(() => this.eventEmitter.fire(this.uri));
231 }
232 }
233 private onDidChangeActiveTextEditor(editor: vscode.TextEditor | undefined) {
234 if (editor && isRustEditor(editor)) {
235 this.eventEmitter.fire(this.uri);
236 }
237 }
238
239 provideTextDocumentContent(uri: vscode.Uri, ct: vscode.CancellationToken): vscode.ProviderResult<string> {
240 const rustEditor = ctx.activeRustEditor;
241 if (!rustEditor) return '';
242
243 // When the range based query is enabled we take the range of the selection
244 const range = uri.query === 'range=true' && !rustEditor.selection.isEmpty
245 ? ctx.client.code2ProtocolConverter.asRange(rustEditor.selection)
246 : null;
247
248 const params = { textDocument: { uri: rustEditor.document.uri.toString() }, range, };
249 return ctx.client.sendRequest(ra.syntaxTree, params, ct);
250 }
251
252 get onDidChange(): vscode.Event<vscode.Uri> {
253 return this.eventEmitter.event;
254 }
255 };
256
257 void new AstInspector(ctx);
258
259 ctx.pushCleanup(vscode.workspace.registerTextDocumentContentProvider('rust-analyzer', tdcp));
260 ctx.pushCleanup(vscode.languages.setLanguageConfiguration("ra_syntax_tree", {
261 brackets: [["[", ")"]],
262 }));
263
264 return async () => {
265 const editor = vscode.window.activeTextEditor;
266 const rangeEnabled = !!editor && !editor.selection.isEmpty;
267
268 const uri = rangeEnabled
269 ? vscode.Uri.parse(`${tdcp.uri.toString()}?range=true`)
270 : tdcp.uri;
271
272 const document = await vscode.workspace.openTextDocument(uri);
273
274 tdcp.eventEmitter.fire(uri);
275
276 void await vscode.window.showTextDocument(document, {
277 viewColumn: vscode.ViewColumn.Two,
278 preserveFocus: true
279 });
280 };
281}
282
283
284// Opens the virtual file that will show the syntax tree
285//
286// The contents of the file come from the `TextDocumentContentProvider`
287export function expandMacro(ctx: Ctx): Cmd {
288 function codeFormat(expanded: ra.ExpandedMacro): string {
289 let result = `// Recursive expansion of ${expanded.name}! macro\n`;
290 result += '// ' + '='.repeat(result.length - 3);
291 result += '\n\n';
292 result += expanded.expansion;
293
294 return result;
295 }
296
297 const tdcp = new class implements vscode.TextDocumentContentProvider {
298 uri = vscode.Uri.parse('rust-analyzer://expandMacro/[EXPANSION].rs');
299 eventEmitter = new vscode.EventEmitter<vscode.Uri>();
300 async provideTextDocumentContent(_uri: vscode.Uri): Promise<string> {
301 const editor = vscode.window.activeTextEditor;
302 const client = ctx.client;
303 if (!editor || !client) return '';
304
305 const position = editor.selection.active;
306
307 const expanded = await client.sendRequest(ra.expandMacro, {
308 textDocument: { uri: editor.document.uri.toString() },
309 position,
310 });
311
312 if (expanded == null) return 'Not available';
313
314 return codeFormat(expanded);
315 }
316
317 get onDidChange(): vscode.Event<vscode.Uri> {
318 return this.eventEmitter.event;
319 }
320 }();
321
322 ctx.pushCleanup(
323 vscode.workspace.registerTextDocumentContentProvider(
324 'rust-analyzer',
325 tdcp,
326 ),
327 );
328
329 return async () => {
330 const document = await vscode.workspace.openTextDocument(tdcp.uri);
331 tdcp.eventEmitter.fire(tdcp.uri);
332 return vscode.window.showTextDocument(
333 document,
334 vscode.ViewColumn.Two,
335 true,
336 );
337 };
338}
339
340export function collectGarbage(ctx: Ctx): Cmd {
341 return async () => ctx.client.sendRequest(ra.collectGarbage, null);
342}
343
344export function showReferences(ctx: Ctx): Cmd {
345 return (uri: string, position: lc.Position, locations: lc.Location[]) => {
346 const client = ctx.client;
347 if (client) {
348 vscode.commands.executeCommand(
349 'editor.action.showReferences',
350 vscode.Uri.parse(uri),
351 client.protocol2CodeConverter.asPosition(position),
352 locations.map(client.protocol2CodeConverter.asLocation),
353 );
354 }
355 };
356}
357
358export function applyActionGroup(_ctx: Ctx): Cmd {
359 return async (actions: { label: string; edit: vscode.WorkspaceEdit }[]) => {
360 const selectedAction = await vscode.window.showQuickPick(actions);
361 if (!selectedAction) return;
362 await applySnippetWorkspaceEdit(selectedAction.edit);
363 };
364}
365
366export function applySnippetWorkspaceEditCommand(_ctx: Ctx): Cmd {
367 return async (edit: vscode.WorkspaceEdit) => {
368 await applySnippetWorkspaceEdit(edit);
369 };
370}
diff --git a/editors/code/src/commands/analyzer_status.ts b/editors/code/src/commands/analyzer_status.ts
deleted file mode 100644
index 09daa3402..000000000
--- a/editors/code/src/commands/analyzer_status.ts
+++ /dev/null
@@ -1,51 +0,0 @@
1import * as vscode from 'vscode';
2
3import * as ra from '../rust-analyzer-api';
4import { Ctx, Cmd } from '../ctx';
5
6// Shows status of rust-analyzer (for debugging)
7export function analyzerStatus(ctx: Ctx): Cmd {
8 let poller: NodeJS.Timer | undefined = undefined;
9 const tdcp = new TextDocumentContentProvider(ctx);
10
11 ctx.pushCleanup(
12 vscode.workspace.registerTextDocumentContentProvider(
13 'rust-analyzer-status',
14 tdcp,
15 ),
16 );
17
18 ctx.pushCleanup({
19 dispose() {
20 if (poller !== undefined) {
21 clearInterval(poller);
22 }
23 },
24 });
25
26 return async () => {
27 if (poller === undefined) {
28 poller = setInterval(() => tdcp.eventEmitter.fire(tdcp.uri), 1000);
29 }
30 const document = await vscode.workspace.openTextDocument(tdcp.uri);
31 return vscode.window.showTextDocument(document, vscode.ViewColumn.Two, true);
32 };
33}
34
35class TextDocumentContentProvider implements vscode.TextDocumentContentProvider {
36 readonly uri = vscode.Uri.parse('rust-analyzer-status://status');
37 readonly eventEmitter = new vscode.EventEmitter<vscode.Uri>();
38
39 constructor(private readonly ctx: Ctx) {
40 }
41
42 provideTextDocumentContent(_uri: vscode.Uri): vscode.ProviderResult<string> {
43 if (!vscode.window.activeTextEditor) return '';
44
45 return this.ctx.client.sendRequest(ra.analyzerStatus, null);
46 }
47
48 get onDidChange(): vscode.Event<vscode.Uri> {
49 return this.eventEmitter.event;
50 }
51}
diff --git a/editors/code/src/commands/expand_macro.ts b/editors/code/src/commands/expand_macro.ts
deleted file mode 100644
index 23f2ef1d5..000000000
--- a/editors/code/src/commands/expand_macro.ts
+++ /dev/null
@@ -1,66 +0,0 @@
1import * as vscode from 'vscode';
2import * as ra from '../rust-analyzer-api';
3
4import { Ctx, Cmd } from '../ctx';
5
6// Opens the virtual file that will show the syntax tree
7//
8// The contents of the file come from the `TextDocumentContentProvider`
9export function expandMacro(ctx: Ctx): Cmd {
10 const tdcp = new TextDocumentContentProvider(ctx);
11 ctx.pushCleanup(
12 vscode.workspace.registerTextDocumentContentProvider(
13 'rust-analyzer',
14 tdcp,
15 ),
16 );
17
18 return async () => {
19 const document = await vscode.workspace.openTextDocument(tdcp.uri);
20 tdcp.eventEmitter.fire(tdcp.uri);
21 return vscode.window.showTextDocument(
22 document,
23 vscode.ViewColumn.Two,
24 true,
25 );
26 };
27}
28
29function codeFormat(expanded: ra.ExpandedMacro): string {
30 let result = `// Recursive expansion of ${expanded.name}! macro\n`;
31 result += '// ' + '='.repeat(result.length - 3);
32 result += '\n\n';
33 result += expanded.expansion;
34
35 return result;
36}
37
38class TextDocumentContentProvider
39 implements vscode.TextDocumentContentProvider {
40 uri = vscode.Uri.parse('rust-analyzer://expandMacro/[EXPANSION].rs');
41 eventEmitter = new vscode.EventEmitter<vscode.Uri>();
42
43 constructor(private readonly ctx: Ctx) {
44 }
45
46 async provideTextDocumentContent(_uri: vscode.Uri): Promise<string> {
47 const editor = vscode.window.activeTextEditor;
48 const client = this.ctx.client;
49 if (!editor || !client) return '';
50
51 const position = editor.selection.active;
52
53 const expanded = await client.sendRequest(ra.expandMacro, {
54 textDocument: { uri: editor.document.uri.toString() },
55 position,
56 });
57
58 if (expanded == null) return 'Not available';
59
60 return codeFormat(expanded);
61 }
62
63 get onDidChange(): vscode.Event<vscode.Uri> {
64 return this.eventEmitter.event;
65 }
66}
diff --git a/editors/code/src/commands/join_lines.ts b/editors/code/src/commands/join_lines.ts
deleted file mode 100644
index 0bf1ee6e6..000000000
--- a/editors/code/src/commands/join_lines.ts
+++ /dev/null
@@ -1,22 +0,0 @@
1import * as ra from '../rust-analyzer-api';
2import * as lc from 'vscode-languageclient';
3
4import { Ctx, Cmd } from '../ctx';
5
6export function joinLines(ctx: Ctx): Cmd {
7 return async () => {
8 const editor = ctx.activeRustEditor;
9 const client = ctx.client;
10 if (!editor || !client) return;
11
12 const items: lc.TextEdit[] = await client.sendRequest(ra.joinLines, {
13 ranges: editor.selections.map((it) => client.code2ProtocolConverter.asRange(it)),
14 textDocument: { uri: editor.document.uri.toString() },
15 });
16 editor.edit((builder) => {
17 client.protocol2CodeConverter.asTextEdits(items).forEach((edit) => {
18 builder.replace(edit.range, edit.newText);
19 });
20 });
21 };
22}
diff --git a/editors/code/src/commands/matching_brace.ts b/editors/code/src/commands/matching_brace.ts
deleted file mode 100644
index a60776e2d..000000000
--- a/editors/code/src/commands/matching_brace.ts
+++ /dev/null
@@ -1,27 +0,0 @@
1import * as vscode from 'vscode';
2import * as ra from '../rust-analyzer-api';
3
4import { Ctx, Cmd } from '../ctx';
5
6export function matchingBrace(ctx: Ctx): Cmd {
7 return async () => {
8 const editor = ctx.activeRustEditor;
9 const client = ctx.client;
10 if (!editor || !client) return;
11
12 const response = await client.sendRequest(ra.findMatchingBrace, {
13 textDocument: { uri: editor.document.uri.toString() },
14 offsets: editor.selections.map(s =>
15 client.code2ProtocolConverter.asPosition(s.active),
16 ),
17 });
18 editor.selections = editor.selections.map((sel, idx) => {
19 const active = client.protocol2CodeConverter.asPosition(
20 response[idx],
21 );
22 const anchor = sel.isEmpty ? active : sel.anchor;
23 return new vscode.Selection(anchor, active);
24 });
25 editor.revealRange(editor.selection);
26 };
27}
diff --git a/editors/code/src/commands/on_enter.ts b/editors/code/src/commands/on_enter.ts
deleted file mode 100644
index a7871c31e..000000000
--- a/editors/code/src/commands/on_enter.ts
+++ /dev/null
@@ -1,35 +0,0 @@
1import * as vscode from 'vscode';
2import * as ra from '../rust-analyzer-api';
3
4import { Cmd, Ctx } from '../ctx';
5import { applySnippetWorkspaceEdit } from '.';
6
7async function handleKeypress(ctx: Ctx) {
8 const editor = ctx.activeRustEditor;
9 const client = ctx.client;
10
11 if (!editor || !client) return false;
12
13 const change = await client.sendRequest(ra.onEnter, {
14 textDocument: { uri: editor.document.uri.toString() },
15 position: client.code2ProtocolConverter.asPosition(
16 editor.selection.active,
17 ),
18 }).catch(_error => {
19 // client.logFailedRequest(OnEnterRequest.type, error);
20 return null;
21 });
22 if (!change) return false;
23
24 const workspaceEdit = client.protocol2CodeConverter.asWorkspaceEdit(change);
25 await applySnippetWorkspaceEdit(workspaceEdit);
26 return true;
27}
28
29export function onEnter(ctx: Ctx): Cmd {
30 return async () => {
31 if (await handleKeypress(ctx)) return;
32
33 await vscode.commands.executeCommand('default:type', { text: '\n' });
34 };
35}
diff --git a/editors/code/src/commands/parent_module.ts b/editors/code/src/commands/parent_module.ts
deleted file mode 100644
index 8f78ddd71..000000000
--- a/editors/code/src/commands/parent_module.ts
+++ /dev/null
@@ -1,29 +0,0 @@
1import * as vscode from 'vscode';
2import * as ra from '../rust-analyzer-api';
3
4import { Ctx, Cmd } from '../ctx';
5
6export function parentModule(ctx: Ctx): Cmd {
7 return async () => {
8 const editor = ctx.activeRustEditor;
9 const client = ctx.client;
10 if (!editor || !client) return;
11
12 const response = await client.sendRequest(ra.parentModule, {
13 textDocument: { uri: editor.document.uri.toString() },
14 position: client.code2ProtocolConverter.asPosition(
15 editor.selection.active,
16 ),
17 });
18 const loc = response[0];
19 if (loc == null) return;
20
21 const uri = client.protocol2CodeConverter.asUri(loc.uri);
22 const range = client.protocol2CodeConverter.asRange(loc.range);
23
24 const doc = await vscode.workspace.openTextDocument(uri);
25 const e = await vscode.window.showTextDocument(doc);
26 e.selection = new vscode.Selection(range.start, range.start);
27 e.revealRange(range, vscode.TextEditorRevealType.InCenter);
28 };
29}
diff --git a/editors/code/src/commands/server_version.ts b/editors/code/src/commands/server_version.ts
deleted file mode 100644
index d64ac726e..000000000
--- a/editors/code/src/commands/server_version.ts
+++ /dev/null
@@ -1,15 +0,0 @@
1import * as vscode from "vscode";
2import { spawnSync } from "child_process";
3import { Ctx, Cmd } from '../ctx';
4
5export function serverVersion(ctx: Ctx): Cmd {
6 return async () => {
7 const { stdout } = spawnSync(ctx.serverPath, ["--version"], { encoding: "utf8" });
8 const commitHash = stdout.slice(`rust-analyzer `.length).trim();
9 const { releaseTag } = ctx.config.package;
10
11 void vscode.window.showInformationMessage(
12 `rust-analyzer version: ${releaseTag ?? "unreleased"} (${commitHash})`
13 );
14 };
15}
diff --git a/editors/code/src/commands/ssr.ts b/editors/code/src/commands/ssr.ts
deleted file mode 100644
index 5d40a64d2..000000000
--- a/editors/code/src/commands/ssr.ts
+++ /dev/null
@@ -1,30 +0,0 @@
1import * as vscode from 'vscode';
2import * as ra from "../rust-analyzer-api";
3
4import { Ctx, Cmd } from '../ctx';
5
6export function ssr(ctx: Ctx): Cmd {
7 return async () => {
8 const client = ctx.client;
9 if (!client) return;
10
11 const options: vscode.InputBoxOptions = {
12 value: "() ==>> ()",
13 prompt: "Enter request, for example 'Foo($a:expr) ==> Foo::new($a)' ",
14 validateInput: async (x: string) => {
15 try {
16 await client.sendRequest(ra.ssr, { query: x, parseOnly: true });
17 } catch (e) {
18 return e.toString();
19 }
20 return null;
21 }
22 };
23 const request = await vscode.window.showInputBox(options);
24 if (!request) return;
25
26 const edit = await client.sendRequest(ra.ssr, { query: request, parseOnly: false });
27
28 await vscode.workspace.applyEdit(client.protocol2CodeConverter.asWorkspaceEdit(edit));
29 };
30}
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index ee294fbe3..e8abf8284 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -8,7 +8,7 @@ export const NIGHTLY_TAG = "nightly";
8export class Config { 8export class Config {
9 readonly extensionId = "matklad.rust-analyzer"; 9 readonly extensionId = "matklad.rust-analyzer";
10 10
11 private readonly rootSection = "rust-analyzer"; 11 readonly rootSection = "rust-analyzer";
12 private readonly requiresReloadOpts = [ 12 private readonly requiresReloadOpts = [
13 "serverPath", 13 "serverPath",
14 "cargo", 14 "cargo",
diff --git a/editors/code/src/debug.ts b/editors/code/src/debug.ts
index d3fe588e8..027504ecd 100644
--- a/editors/code/src/debug.ts
+++ b/editors/code/src/debug.ts
@@ -1,7 +1,7 @@
1import * as os from "os"; 1import * as os from "os";
2import * as vscode from 'vscode'; 2import * as vscode from 'vscode';
3import * as path from 'path'; 3import * as path from 'path';
4import * as ra from './rust-analyzer-api'; 4import * as ra from './lsp_ext';
5 5
6import { Cargo } from './cargo'; 6import { Cargo } from './cargo';
7import { Ctx } from "./ctx"; 7import { Ctx } from "./ctx";
diff --git a/editors/code/src/inlay_hints.ts b/editors/code/src/inlay_hints.ts
index a2b07d003..9e6d6045f 100644
--- a/editors/code/src/inlay_hints.ts
+++ b/editors/code/src/inlay_hints.ts
@@ -1,6 +1,6 @@
1import * as lc from "vscode-languageclient"; 1import * as lc from "vscode-languageclient";
2import * as vscode from 'vscode'; 2import * as vscode from 'vscode';
3import * as ra from './rust-analyzer-api'; 3import * as ra from './lsp_ext';
4 4
5import { Ctx, Disposable } from './ctx'; 5import { Ctx, Disposable } from './ctx';
6import { sendRequestWithRetry, isRustDocument, RustDocument, RustEditor, sleep } from './util'; 6import { sendRequestWithRetry, isRustDocument, RustDocument, RustEditor, sleep } from './util';
diff --git a/editors/code/src/lsp_ext.ts b/editors/code/src/lsp_ext.ts
new file mode 100644
index 000000000..4da12eb30
--- /dev/null
+++ b/editors/code/src/lsp_ext.ts
@@ -0,0 +1,84 @@
1/**
2 * This file mirrors `crates/rust-analyzer/src/req.rs` declarations.
3 */
4
5import * as lc from "vscode-languageclient";
6
7export const analyzerStatus = new lc.RequestType<null, string, void>("rust-analyzer/analyzerStatus");
8
9export const collectGarbage = new lc.RequestType<null, null, void>("rust-analyzer/collectGarbage");
10
11export interface SyntaxTreeParams {
12 textDocument: lc.TextDocumentIdentifier;
13 range: lc.Range | null;
14}
15export const syntaxTree = new lc.RequestType<SyntaxTreeParams, string, void>("rust-analyzer/syntaxTree");
16
17
18export interface ExpandMacroParams {
19 textDocument: lc.TextDocumentIdentifier;
20 position: lc.Position;
21}
22export interface ExpandedMacro {
23 name: string;
24 expansion: string;
25}
26export const expandMacro = new lc.RequestType<ExpandMacroParams, ExpandedMacro | null, void>("rust-analyzer/expandMacro");
27
28export interface MatchingBraceParams {
29 textDocument: lc.TextDocumentIdentifier;
30 positions: lc.Position[];
31}
32export const matchingBrace = new lc.RequestType<MatchingBraceParams, lc.Position[], void>("experimental/matchingBrace");
33
34export const parentModule = new lc.RequestType<lc.TextDocumentPositionParams, lc.LocationLink[], void>("experimental/parentModule");
35
36export interface JoinLinesParams {
37 textDocument: lc.TextDocumentIdentifier;
38 ranges: lc.Range[];
39}
40export const joinLines = new lc.RequestType<JoinLinesParams, lc.TextEdit[], void>("experimental/joinLines");
41
42export const onEnter = new lc.RequestType<lc.TextDocumentPositionParams, lc.TextEdit[], void>("experimental/onEnter");
43
44export interface RunnablesParams {
45 textDocument: lc.TextDocumentIdentifier;
46 position: lc.Position | null;
47}
48export interface Runnable {
49 range: lc.Range;
50 label: string;
51 bin: string;
52 args: string[];
53 extraArgs: string[];
54 env: { [key: string]: string };
55 cwd: string | null;
56}
57export const runnables = new lc.RequestType<RunnablesParams, Runnable[], void>("rust-analyzer/runnables");
58
59export type InlayHint = InlayHint.TypeHint | InlayHint.ParamHint | InlayHint.ChainingHint;
60
61export namespace InlayHint {
62 export const enum Kind {
63 TypeHint = "TypeHint",
64 ParamHint = "ParameterHint",
65 ChainingHint = "ChainingHint",
66 }
67 interface Common {
68 range: lc.Range;
69 label: string;
70 }
71 export type TypeHint = Common & { kind: Kind.TypeHint };
72 export type ParamHint = Common & { kind: Kind.ParamHint };
73 export type ChainingHint = Common & { kind: Kind.ChainingHint };
74}
75export interface InlayHintsParams {
76 textDocument: lc.TextDocumentIdentifier;
77}
78export const inlayHints = new lc.RequestType<InlayHintsParams, InlayHint[], void>("rust-analyzer/inlayHints");
79
80export interface SsrParams {
81 query: string;
82 parseOnly: boolean;
83}
84export const ssr = new lc.RequestType<SsrParams, lc.WorkspaceEdit, void>('experimental/ssr');
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index 8b0a9d870..b7337621c 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -1,7 +1,7 @@
1import * as vscode from 'vscode'; 1import * as vscode from 'vscode';
2import * as path from "path"; 2import * as path from "path";
3import * as os from "os"; 3import * as os from "os";
4import { promises as fs } from "fs"; 4import { promises as fs, PathLike } from "fs";
5 5
6import * as commands from './commands'; 6import * as commands from './commands';
7import { activateInlayHints } from './inlay_hints'; 7import { activateInlayHints } from './inlay_hints';
@@ -12,9 +12,13 @@ import { log, assert, isValidExecutable } from './util';
12import { PersistentState } from './persistent_state'; 12import { PersistentState } from './persistent_state';
13import { fetchRelease, download } from './net'; 13import { fetchRelease, download } from './net';
14import { activateTaskProvider } from './tasks'; 14import { activateTaskProvider } from './tasks';
15import { setContextValue } from './util';
16import { exec } from 'child_process';
15 17
16let ctx: Ctx | undefined; 18let ctx: Ctx | undefined;
17 19
20const RUST_PROJECT_CONTEXT_NAME = "inRustProject";
21
18export async function activate(context: vscode.ExtensionContext) { 22export async function activate(context: vscode.ExtensionContext) {
19 // Register a "dumb" onEnter command for the case where server fails to 23 // Register a "dumb" onEnter command for the case where server fails to
20 // start. 24 // start.
@@ -53,6 +57,8 @@ export async function activate(context: vscode.ExtensionContext) {
53 // This a horribly, horribly wrong way to deal with this problem. 57 // This a horribly, horribly wrong way to deal with this problem.
54 ctx = await Ctx.create(config, context, serverPath, workspaceFolder.uri.fsPath); 58 ctx = await Ctx.create(config, context, serverPath, workspaceFolder.uri.fsPath);
55 59
60 setContextValue(RUST_PROJECT_CONTEXT_NAME, true);
61
56 // Commands which invokes manually via command palette, shortcut, etc. 62 // Commands which invokes manually via command palette, shortcut, etc.
57 63
58 // Reloading is inspired by @DanTup maneuver: https://github.com/microsoft/vscode/issues/45774#issuecomment-373423895 64 // Reloading is inspired by @DanTup maneuver: https://github.com/microsoft/vscode/issues/45774#issuecomment-373423895
@@ -85,14 +91,14 @@ export async function activate(context: vscode.ExtensionContext) {
85 91
86 ctx.registerCommand('ssr', commands.ssr); 92 ctx.registerCommand('ssr', commands.ssr);
87 ctx.registerCommand('serverVersion', commands.serverVersion); 93 ctx.registerCommand('serverVersion', commands.serverVersion);
94 ctx.registerCommand('toggleInlayHints', commands.toggleInlayHints);
88 95
89 // Internal commands which are invoked by the server. 96 // Internal commands which are invoked by the server.
90 ctx.registerCommand('runSingle', commands.runSingle); 97 ctx.registerCommand('runSingle', commands.runSingle);
91 ctx.registerCommand('debugSingle', commands.debugSingle); 98 ctx.registerCommand('debugSingle', commands.debugSingle);
92 ctx.registerCommand('showReferences', commands.showReferences); 99 ctx.registerCommand('showReferences', commands.showReferences);
93 ctx.registerCommand('applySourceChange', commands.applySourceChange);
94 ctx.registerCommand('applySnippetWorkspaceEdit', commands.applySnippetWorkspaceEditCommand); 100 ctx.registerCommand('applySnippetWorkspaceEdit', commands.applySnippetWorkspaceEditCommand);
95 ctx.registerCommand('selectAndApplySourceChange', commands.selectAndApplySourceChange); 101 ctx.registerCommand('applyActionGroup', commands.applyActionGroup);
96 102
97 ctx.pushCleanup(activateTaskProvider(workspaceFolder)); 103 ctx.pushCleanup(activateTaskProvider(workspaceFolder));
98 104
@@ -108,6 +114,7 @@ export async function activate(context: vscode.ExtensionContext) {
108} 114}
109 115
110export async function deactivate() { 116export async function deactivate() {
117 setContextValue(RUST_PROJECT_CONTEXT_NAME, undefined);
111 await ctx?.client.stop(); 118 await ctx?.client.stop();
112 ctx = undefined; 119 ctx = undefined;
113} 120}
@@ -188,6 +195,46 @@ async function bootstrapServer(config: Config, state: PersistentState): Promise<
188 return path; 195 return path;
189} 196}
190 197
198async function patchelf(dest: PathLike): Promise<void> {
199 await vscode.window.withProgress(
200 {
201 location: vscode.ProgressLocation.Notification,
202 title: "Patching rust-analyzer for NixOS"
203 },
204 async (progress, _) => {
205 const expression = `
206 {src, pkgs ? import <nixpkgs> {}}:
207 pkgs.stdenv.mkDerivation {
208 name = "rust-analyzer";
209 inherit src;
210 phases = [ "installPhase" "fixupPhase" ];
211 installPhase = "cp $src $out";
212 fixupPhase = ''
213 chmod 755 $out
214 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out
215 '';
216 }
217 `;
218 const origFile = dest + "-orig";
219 await fs.rename(dest, origFile);
220 progress.report({ message: "Patching executable", increment: 20 });
221 await new Promise((resolve, reject) => {
222 const handle = exec(`nix-build -E - --arg src '${origFile}' -o ${dest}`,
223 (err, stdout, stderr) => {
224 if (err != null) {
225 reject(Error(stderr));
226 } else {
227 resolve(stdout);
228 }
229 });
230 handle.stdin?.write(expression);
231 handle.stdin?.end();
232 });
233 await fs.unlink(origFile);
234 }
235 );
236}
237
191async function getServer(config: Config, state: PersistentState): Promise<string | undefined> { 238async function getServer(config: Config, state: PersistentState): Promise<string | undefined> {
192 const explicitPath = process.env.__RA_LSP_SERVER_DEBUG ?? config.serverPath; 239 const explicitPath = process.env.__RA_LSP_SERVER_DEBUG ?? config.serverPath;
193 if (explicitPath) { 240 if (explicitPath) {
@@ -237,6 +284,12 @@ async function getServer(config: Config, state: PersistentState): Promise<string
237 assert(!!artifact, `Bad release: ${JSON.stringify(release)}`); 284 assert(!!artifact, `Bad release: ${JSON.stringify(release)}`);
238 285
239 await download(artifact.browser_download_url, dest, "Downloading rust-analyzer server", { mode: 0o755 }); 286 await download(artifact.browser_download_url, dest, "Downloading rust-analyzer server", { mode: 0o755 });
287
288 // Patching executable if that's NixOS.
289 if (await fs.stat("/etc/nixos").then(_ => true).catch(_ => false)) {
290 await patchelf(dest);
291 }
292
240 await state.updateServerVersion(config.package.version); 293 await state.updateServerVersion(config.package.version);
241 return dest; 294 return dest;
242} 295}
diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/run.ts
index 0bd30fb07..2a7a429cf 100644
--- a/editors/code/src/commands/runnables.ts
+++ b/editors/code/src/run.ts
@@ -1,13 +1,13 @@
1import * as vscode from 'vscode'; 1import * as vscode from 'vscode';
2import * as lc from 'vscode-languageclient'; 2import * as lc from 'vscode-languageclient';
3import * as ra from '../rust-analyzer-api'; 3import * as ra from './lsp_ext';
4 4
5import { Ctx, Cmd } from '../ctx'; 5import { Ctx, Cmd } from './ctx';
6import { startDebugSession, getDebugConfiguration } from '../debug'; 6import { startDebugSession, getDebugConfiguration } from './debug';
7 7
8const quickPickButtons = [{ iconPath: new vscode.ThemeIcon("save"), tooltip: "Save as a launch.json configurtation." }]; 8const quickPickButtons = [{ iconPath: new vscode.ThemeIcon("save"), tooltip: "Save as a launch.json configurtation." }];
9 9
10async function selectRunnable(ctx: Ctx, prevRunnable?: RunnableQuickPick, debuggeeOnly = false, showButtons: boolean = true): Promise<RunnableQuickPick | undefined> { 10export async function selectRunnable(ctx: Ctx, prevRunnable?: RunnableQuickPick, debuggeeOnly = false, showButtons: boolean = true): Promise<RunnableQuickPick | undefined> {
11 const editor = ctx.activeRustEditor; 11 const editor = ctx.activeRustEditor;
12 const client = ctx.client; 12 const client = ctx.client;
13 if (!editor || !client) return; 13 if (!editor || !client) return;
@@ -83,20 +83,6 @@ async function selectRunnable(ctx: Ctx, prevRunnable?: RunnableQuickPick, debugg
83 }); 83 });
84} 84}
85 85
86export function run(ctx: Ctx): Cmd {
87 let prevRunnable: RunnableQuickPick | undefined;
88
89 return async () => {
90 const item = await selectRunnable(ctx, prevRunnable);
91 if (!item) return;
92
93 item.detail = 'rerun';
94 prevRunnable = item;
95 const task = createTask(item.runnable);
96 return await vscode.tasks.executeTask(task);
97 };
98}
99
100export function runSingle(ctx: Ctx): Cmd { 86export function runSingle(ctx: Ctx): Cmd {
101 return async (runnable: ra.Runnable) => { 87 return async (runnable: ra.Runnable) => {
102 const editor = ctx.activeRustEditor; 88 const editor = ctx.activeRustEditor;
@@ -165,7 +151,7 @@ export function newDebugConfig(ctx: Ctx): Cmd {
165 }; 151 };
166} 152}
167 153
168class RunnableQuickPick implements vscode.QuickPickItem { 154export class RunnableQuickPick implements vscode.QuickPickItem {
169 public label: string; 155 public label: string;
170 public description?: string | undefined; 156 public description?: string | undefined;
171 public detail?: string | undefined; 157 public detail?: string | undefined;
@@ -184,7 +170,7 @@ interface CargoTaskDefinition extends vscode.TaskDefinition {
184 env?: { [key: string]: string }; 170 env?: { [key: string]: string };
185} 171}
186 172
187function createTask(spec: ra.Runnable): vscode.Task { 173export function createTask(spec: ra.Runnable): vscode.Task {
188 const TASK_SOURCE = 'Rust'; 174 const TASK_SOURCE = 'Rust';
189 const definition: CargoTaskDefinition = { 175 const definition: CargoTaskDefinition = {
190 type: 'cargo', 176 type: 'cargo',
diff --git a/editors/code/src/rust-analyzer-api.ts b/editors/code/src/rust-analyzer-api.ts
deleted file mode 100644
index 73f36432f..000000000
--- a/editors/code/src/rust-analyzer-api.ts
+++ /dev/null
@@ -1,125 +0,0 @@
1/**
2 * This file mirrors `crates/rust-analyzer/src/req.rs` declarations.
3 */
4
5import * as lc from "vscode-languageclient";
6
7type Option<T> = null | T;
8type Vec<T> = T[];
9type FxHashMap<K extends PropertyKey, V> = Record<K, V>;
10
11function request<TParams, TResult>(method: string) {
12 return new lc.RequestType<TParams, TResult, unknown>(`rust-analyzer/${method}`);
13}
14function notification<TParam>(method: string) {
15 return new lc.NotificationType<TParam>(method);
16}
17
18
19export const analyzerStatus = request<null, string>("analyzerStatus");
20
21
22export const collectGarbage = request<null, null>("collectGarbage");
23
24
25export interface SyntaxTreeParams {
26 textDocument: lc.TextDocumentIdentifier;
27 range: Option<lc.Range>;
28}
29export const syntaxTree = request<SyntaxTreeParams, string>("syntaxTree");
30
31
32export interface ExpandMacroParams {
33 textDocument: lc.TextDocumentIdentifier;
34 position: Option<lc.Position>;
35}
36export interface ExpandedMacro {
37 name: string;
38 expansion: string;
39}
40export const expandMacro = request<ExpandMacroParams, Option<ExpandedMacro>>("expandMacro");
41
42
43export interface FindMatchingBraceParams {
44 textDocument: lc.TextDocumentIdentifier;
45 offsets: Vec<lc.Position>;
46}
47export const findMatchingBrace = request<FindMatchingBraceParams, Vec<lc.Position>>("findMatchingBrace");
48
49
50export interface PublishDecorationsParams {
51 uri: string;
52 decorations: Vec<Decoration>;
53}
54export interface Decoration {
55 range: lc.Range;
56 tag: string;
57 bindingHash: Option<string>;
58}
59export const decorationsRequest = request<lc.TextDocumentIdentifier, Vec<Decoration>>("decorationsRequest");
60
61
62export const parentModule = request<lc.TextDocumentPositionParams, Vec<lc.Location>>("parentModule");
63
64
65export interface JoinLinesParams {
66 textDocument: lc.TextDocumentIdentifier;
67 ranges: lc.Range[];
68}
69export const joinLines = new lc.RequestType<JoinLinesParams, lc.TextEdit[], unknown>('experimental/joinLines');
70
71
72export const onEnter = request<lc.TextDocumentPositionParams, Option<lc.WorkspaceEdit>>("onEnter");
73
74export interface RunnablesParams {
75 textDocument: lc.TextDocumentIdentifier;
76 position: Option<lc.Position>;
77}
78export interface Runnable {
79 range: lc.Range;
80 label: string;
81 bin: string;
82 args: Vec<string>;
83 extraArgs: Vec<string>;
84 env: FxHashMap<string, string>;
85 cwd: Option<string>;
86}
87export const runnables = request<RunnablesParams, Vec<Runnable>>("runnables");
88
89export type InlayHint = InlayHint.TypeHint | InlayHint.ParamHint | InlayHint.ChainingHint;
90
91export namespace InlayHint {
92 export const enum Kind {
93 TypeHint = "TypeHint",
94 ParamHint = "ParameterHint",
95 ChainingHint = "ChainingHint",
96 }
97 interface Common {
98 range: lc.Range;
99 label: string;
100 }
101 export type TypeHint = Common & { kind: Kind.TypeHint };
102 export type ParamHint = Common & { kind: Kind.ParamHint };
103 export type ChainingHint = Common & { kind: Kind.ChainingHint };
104}
105export interface InlayHintsParams {
106 textDocument: lc.TextDocumentIdentifier;
107}
108export const inlayHints = request<InlayHintsParams, Vec<InlayHint>>("inlayHints");
109
110
111export interface SsrParams {
112 query: string;
113 parseOnly: boolean;
114}
115export const ssr = new lc.RequestType<SsrParams, lc.WorkspaceEdit, unknown>('experimental/ssr');
116
117
118export const publishDecorations = notification<PublishDecorationsParams>("publishDecorations");
119
120
121export interface SourceChange {
122 label: string;
123 workspaceEdit: lc.WorkspaceEdit;
124 cursorPosition: Option<lc.TextDocumentPositionParams>;
125}
diff --git a/editors/code/src/commands/index.ts b/editors/code/src/snippets.ts
index e5ed77e32..bcb3f2cc7 100644
--- a/editors/code/src/commands/index.ts
+++ b/editors/code/src/snippets.ts
@@ -1,63 +1,6 @@
1import * as vscode from 'vscode'; 1import * as vscode from 'vscode';
2import * as lc from 'vscode-languageclient';
3import * as ra from '../rust-analyzer-api';
4 2
5import { Ctx, Cmd } from '../ctx'; 3import { assert } from './util';
6import * as sourceChange from '../source_change';
7import { assert } from '../util';
8
9export * from './analyzer_status';
10export * from './matching_brace';
11export * from './join_lines';
12export * from './on_enter';
13export * from './parent_module';
14export * from './syntax_tree';
15export * from './expand_macro';
16export * from './runnables';
17export * from './ssr';
18export * from './server_version';
19
20export function collectGarbage(ctx: Ctx): Cmd {
21 return async () => ctx.client.sendRequest(ra.collectGarbage, null);
22}
23
24export function showReferences(ctx: Ctx): Cmd {
25 return (uri: string, position: lc.Position, locations: lc.Location[]) => {
26 const client = ctx.client;
27 if (client) {
28 vscode.commands.executeCommand(
29 'editor.action.showReferences',
30 vscode.Uri.parse(uri),
31 client.protocol2CodeConverter.asPosition(position),
32 locations.map(client.protocol2CodeConverter.asLocation),
33 );
34 }
35 };
36}
37
38export function applySourceChange(ctx: Ctx): Cmd {
39 return async (change: ra.SourceChange) => {
40 await sourceChange.applySourceChange(ctx, change);
41 };
42}
43
44export function selectAndApplySourceChange(ctx: Ctx): Cmd {
45 return async (changes: ra.SourceChange[]) => {
46 if (changes.length === 1) {
47 await sourceChange.applySourceChange(ctx, changes[0]);
48 } else if (changes.length > 0) {
49 const selectedChange = await vscode.window.showQuickPick(changes);
50 if (!selectedChange) return;
51 await sourceChange.applySourceChange(ctx, selectedChange);
52 }
53 };
54}
55
56export function applySnippetWorkspaceEditCommand(_ctx: Ctx): Cmd {
57 return async (edit: vscode.WorkspaceEdit) => {
58 await applySnippetWorkspaceEdit(edit);
59 };
60}
61 4
62export async function applySnippetWorkspaceEdit(edit: vscode.WorkspaceEdit) { 5export async function applySnippetWorkspaceEdit(edit: vscode.WorkspaceEdit) {
63 assert(edit.entries().length === 1, `bad ws edit: ${JSON.stringify(edit)}`); 6 assert(edit.entries().length === 1, `bad ws edit: ${JSON.stringify(edit)}`);
@@ -65,7 +8,10 @@ export async function applySnippetWorkspaceEdit(edit: vscode.WorkspaceEdit) {
65 8
66 const editor = vscode.window.visibleTextEditors.find((it) => it.document.uri.toString() === uri.toString()); 9 const editor = vscode.window.visibleTextEditors.find((it) => it.document.uri.toString() === uri.toString());
67 if (!editor) return; 10 if (!editor) return;
11 await applySnippetTextEdits(editor, edits);
12}
68 13
14export async function applySnippetTextEdits(editor: vscode.TextEditor, edits: vscode.TextEdit[]) {
69 let selection: vscode.Selection | undefined = undefined; 15 let selection: vscode.Selection | undefined = undefined;
70 let lineDelta = 0; 16 let lineDelta = 0;
71 await editor.edit((builder) => { 17 await editor.edit((builder) => {
diff --git a/editors/code/src/source_change.ts b/editors/code/src/source_change.ts
deleted file mode 100644
index af8f1df51..000000000
--- a/editors/code/src/source_change.ts
+++ /dev/null
@@ -1,54 +0,0 @@
1import * as vscode from 'vscode';
2import * as lc from 'vscode-languageclient';
3import * as ra from './rust-analyzer-api';
4
5import { Ctx } from './ctx';
6
7export async function applySourceChange(ctx: Ctx, change: ra.SourceChange) {
8 const client = ctx.client;
9 if (!client) return;
10
11 const wsEdit = client.protocol2CodeConverter.asWorkspaceEdit(
12 change.workspaceEdit,
13 );
14 let created;
15 let moved;
16 if (change.workspaceEdit.documentChanges) {
17 for (const docChange of change.workspaceEdit.documentChanges) {
18 if (lc.CreateFile.is(docChange)) {
19 created = docChange.uri;
20 } else if (lc.RenameFile.is(docChange)) {
21 moved = docChange.newUri;
22 }
23 }
24 }
25 const toOpen = created || moved;
26 const toReveal = change.cursorPosition;
27 await vscode.workspace.applyEdit(wsEdit);
28 if (toOpen) {
29 const toOpenUri = vscode.Uri.parse(toOpen);
30 const doc = await vscode.workspace.openTextDocument(toOpenUri);
31 await vscode.window.showTextDocument(doc);
32 } else if (toReveal) {
33 const uri = client.protocol2CodeConverter.asUri(
34 toReveal.textDocument.uri,
35 );
36 const position = client.protocol2CodeConverter.asPosition(
37 toReveal.position,
38 );
39 const editor = vscode.window.activeTextEditor;
40 if (!editor || !editor.selection.isEmpty) {
41 return;
42 }
43
44 if (editor.document.uri !== uri) {
45 const doc = await vscode.workspace.openTextDocument(uri);
46 await vscode.window.showTextDocument(doc);
47 }
48 editor.selection = new vscode.Selection(position, position);
49 editor.revealRange(
50 new vscode.Range(position, position),
51 vscode.TextEditorRevealType.Default,
52 );
53 }
54}
diff --git a/editors/code/src/util.ts b/editors/code/src/util.ts
index 127a9e911..352ef9162 100644
--- a/editors/code/src/util.ts
+++ b/editors/code/src/util.ts
@@ -74,10 +74,11 @@ export type RustDocument = vscode.TextDocument & { languageId: "rust" };
74export type RustEditor = vscode.TextEditor & { document: RustDocument }; 74export type RustEditor = vscode.TextEditor & { document: RustDocument };
75 75
76export function isRustDocument(document: vscode.TextDocument): document is RustDocument { 76export function isRustDocument(document: vscode.TextDocument): document is RustDocument {
77 return document.languageId === 'rust' 77 // Prevent corrupted text (particularly via inlay hints) in diff views
78 // SCM diff views have the same URI as the on-disk document but not the same content 78 // by allowing only `file` schemes
79 && document.uri.scheme !== 'git' 79 // unfortunately extensions that use diff views not always set this
80 && document.uri.scheme !== 'svn'; 80 // to something different than 'file' (see ongoing bug: #4608)
81 return document.languageId === 'rust' && document.uri.scheme === 'file';
81} 82}
82 83
83export function isRustEditor(editor: vscode.TextEditor): editor is RustEditor { 84export function isRustEditor(editor: vscode.TextEditor): editor is RustEditor {
@@ -93,3 +94,8 @@ export function isValidExecutable(path: string): boolean {
93 94
94 return res.status === 0; 95 return res.status === 0;
95} 96}
97
98/** Sets ['when'](https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts) clause contexts */
99export function setContextValue(key: string, value: any): Thenable<void> {
100 return vscode.commands.executeCommand('setContext', key, value);
101}
diff --git a/editors/code/tests/runTests.ts b/editors/code/tests/runTests.ts
new file mode 100644
index 000000000..22df80ad3
--- /dev/null
+++ b/editors/code/tests/runTests.ts
@@ -0,0 +1,43 @@
1import * as path from 'path';
2import * as fs from 'fs';
3
4import { runTests } from 'vscode-test';
5
6async function main() {
7 // The folder containing the Extension Manifest package.json
8 // Passed to `--extensionDevelopmentPath`
9 const extensionDevelopmentPath = path.resolve(__dirname, '../../');
10
11 // Minimum supported version.
12 const jsonData = fs.readFileSync(path.join(extensionDevelopmentPath, 'package.json'));
13 const json = JSON.parse(jsonData.toString());
14 let minimalVersion: string = json.engines.vscode;
15 if (minimalVersion.startsWith('^')) minimalVersion = minimalVersion.slice(1);
16
17 const launchArgs = ["--disable-extensions"];
18
19 // All test suites (either unit tests or integration tests) should be in subfolders.
20 const extensionTestsPath = path.resolve(__dirname, './unit/index');
21
22 // Run tests using the minimal supported version.
23 await runTests({
24 version: minimalVersion,
25 launchArgs,
26 extensionDevelopmentPath,
27 extensionTestsPath
28 });
29
30 // and the latest one
31 await runTests({
32 version: 'stable',
33 launchArgs,
34 extensionDevelopmentPath,
35 extensionTestsPath
36 });
37}
38
39main().catch(err => {
40 // eslint-disable-next-line no-console
41 console.error('Failed to run tests', err);
42 process.exit(1);
43});
diff --git a/editors/code/tests/unit/index.ts b/editors/code/tests/unit/index.ts
new file mode 100644
index 000000000..5165720b4
--- /dev/null
+++ b/editors/code/tests/unit/index.ts
@@ -0,0 +1,38 @@
1import * as path from 'path';
2import Mocha from 'mocha';
3import glob from 'glob';
4
5export function run(): Promise<void> {
6 // Create the mocha test
7 const mocha = new Mocha({
8 ui: 'tdd',
9 color: true
10 });
11
12 const testsRoot = __dirname;
13
14 return new Promise((resolve, reject) => {
15 glob('**/**.test.js', { cwd: testsRoot }, (err, files) => {
16 if (err) {
17 return reject(err);
18 }
19
20 // Add files to the test suite
21 files.forEach(f => mocha.addFile(path.resolve(testsRoot, f)));
22
23 try {
24 // Run the mocha test
25 mocha.timeout(100000);
26 mocha.run(failures => {
27 if (failures > 0) {
28 reject(new Error(`${failures} tests failed.`));
29 } else {
30 resolve();
31 }
32 });
33 } catch (err) {
34 reject(err);
35 }
36 });
37 });
38}
diff --git a/editors/code/tests/unit/launch_config.test.ts b/editors/code/tests/unit/launch_config.test.ts
new file mode 100644
index 000000000..d5cf1b74e
--- /dev/null
+++ b/editors/code/tests/unit/launch_config.test.ts
@@ -0,0 +1,52 @@
1import * as assert from 'assert';
2import * as cargo from '../../src/cargo';
3
4suite('Launch configuration', () => {
5
6 suite('Lens', () => {
7 test('A binary', async () => {
8 const args = cargo.artifactSpec(["build", "--package", "pkg_name", "--bin", "pkg_name"]);
9
10 assert.deepEqual(args.cargoArgs, ["build", "--package", "pkg_name", "--bin", "pkg_name", "--message-format=json"]);
11 assert.deepEqual(args.filter, undefined);
12 });
13
14 test('One of Multiple Binaries', async () => {
15 const args = cargo.artifactSpec(["build", "--package", "pkg_name", "--bin", "bin1"]);
16
17 assert.deepEqual(args.cargoArgs, ["build", "--package", "pkg_name", "--bin", "bin1", "--message-format=json"]);
18 assert.deepEqual(args.filter, undefined);
19 });
20
21 test('A test', async () => {
22 const args = cargo.artifactSpec(["test", "--package", "pkg_name", "--lib", "--no-run"]);
23
24 assert.deepEqual(args.cargoArgs, ["test", "--package", "pkg_name", "--lib", "--no-run", "--message-format=json"]);
25 assert.notDeepEqual(args.filter, undefined);
26 });
27 });
28
29 suite('QuickPick', () => {
30 test('A binary', async () => {
31 const args = cargo.artifactSpec(["run", "--package", "pkg_name", "--bin", "pkg_name"]);
32
33 assert.deepEqual(args.cargoArgs, ["build", "--package", "pkg_name", "--bin", "pkg_name", "--message-format=json"]);
34 assert.deepEqual(args.filter, undefined);
35 });
36
37
38 test('One of Multiple Binaries', async () => {
39 const args = cargo.artifactSpec(["run", "--package", "pkg_name", "--bin", "bin2"]);
40
41 assert.deepEqual(args.cargoArgs, ["build", "--package", "pkg_name", "--bin", "bin2", "--message-format=json"]);
42 assert.deepEqual(args.filter, undefined);
43 });
44
45 test('A test', async () => {
46 const args = cargo.artifactSpec(["test", "--package", "pkg_name", "--lib"]);
47
48 assert.deepEqual(args.cargoArgs, ["test", "--package", "pkg_name", "--lib", "--message-format=json", "--no-run"]);
49 assert.notDeepEqual(args.filter, undefined);
50 });
51 });
52});
diff --git a/editors/code/tsconfig.json b/editors/code/tsconfig.json
index ad134865a..32d1a865f 100644
--- a/editors/code/tsconfig.json
+++ b/editors/code/tsconfig.json
@@ -9,7 +9,7 @@
9 "esModuleInterop": true, 9 "esModuleInterop": true,
10 "allowSyntheticDefaultImports": true, 10 "allowSyntheticDefaultImports": true,
11 "sourceMap": true, 11 "sourceMap": true,
12 "rootDir": "src", 12 "rootDir": ".",
13 "strict": true, 13 "strict": true,
14 "noUnusedLocals": true, 14 "noUnusedLocals": true,
15 "noUnusedParameters": true, 15 "noUnusedParameters": true,
@@ -18,6 +18,11 @@
18 "newLine": "LF" 18 "newLine": "LF"
19 }, 19 },
20 "exclude": [ 20 "exclude": [
21 "node_modules" 21 "node_modules",
22 ".vscode-test"
23 ],
24 "include": [
25 "src",
26 "tests"
22 ] 27 ]
23} 28}