├── .gitignore ├── .vscode ├── launch.json ├── settings.json └── tasks.json ├── .vscodeignore ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── images ├── icon.png ├── laravel-goto-controller.gif └── settings-alternative-controllers-path.jpg ├── package-lock.json ├── package.json ├── src ├── extension.ts ├── link.ts ├── test │ ├── extension.test.ts │ └── index.ts └── util.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | out 2 | node_modules 3 | .vscode-test/ 4 | *.vsix 5 | npm-debug.log 6 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that compiles the extension and then opens it inside a new window 2 | { 3 | "version": "0.1.0", 4 | "configurations": [ 5 | { 6 | "name": "Extension", 7 | "type": "extensionHost", 8 | "request": "launch", 9 | "runtimeExecutable": "${execPath}", 10 | "args": ["--extensionDevelopmentPath=${workspaceRoot}" ], 11 | "stopOnEntry": false, 12 | "sourceMaps": true, 13 | "outFiles": [ "${workspaceRoot}/out/**/*.js" ], 14 | "preLaunchTask": "npm: watch" 15 | }, 16 | { 17 | "name": "Extension Tests", 18 | "type": "extensionHost", 19 | "request": "launch", 20 | "runtimeExecutable": "${execPath}", 21 | "args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test" ], 22 | "stopOnEntry": false, 23 | "sourceMaps": true, 24 | "outFiles": [ "${workspaceRoot}/out/test/**/*.js" ], 25 | "preLaunchTask": "npm: watch" 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "out": false // set this to true to hide the "out" folder with the compiled JS files 5 | }, 6 | "search.exclude": { 7 | "out": true // set this to false to include "out" folder in search results 8 | } 9 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | // See https://go.microsoft.com/fwlink/?LinkId=733558 2 | // for the documentation about the tasks.json format 3 | { 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "watch", 9 | "problemMatcher": "$tsc-watch", 10 | "isBackground": true, 11 | "presentation": { 12 | "reveal": "never" 13 | }, 14 | "group": { 15 | "kind": "build", 16 | "isDefault": true 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | out/test/** 4 | out/**/*.map 5 | src/** 6 | .gitignore 7 | tsconfig.json 8 | vsc-extension-quickstart.md 9 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | ## 0.0.15 - September, 19 2021 4 | 5 | * regression caused by v0.0.14 6 | 7 | ## 0.0.14 - September, 19 2021 8 | 9 | * [link.js] Do not perform checks on undefined lines of text 10 | 11 | ## 0.0.12 - September, 05 2020 12 | 13 | * Fixed a packaging issue made by the `vsce` tool as described at https://github.com/microsoft/vscode-vsce/issues/497 14 | 15 | ## September, 04 2020 16 | 17 | * Support for Laravel 8.0 controllers PHP `Classname::class` notation 18 | * Update npm packages - vulnerabilities fixes 19 | 20 | ## February, 15 2019 21 | 22 | * Ignore vsix files 23 | * read path to folder controllers from user config or default 24 | 25 | Contributor: https://github.com/masterrjj24 26 | 27 | ## January, 17 2019, v0.0.5 28 | 29 | * Npm packages vulnerabilities fixes 30 | * Correction with resource controller detection, and controller with subfolder in name 31 | 32 | Contributor: https://github.com/tnatanael 33 | 34 | ## July, 01 2018, v0.0.4 35 | 36 | Correct package dependencies 37 | 38 | Contributor: https://github.com/tiansin 39 | 40 | ## June, 29 2018, v0.0.3 41 | 42 | The extension now will open the file containing the controller and go to the corresponding line where the function signature starts. 43 | 44 | Fixes: https://github.com/stef-k/laravel-goto-controller/issues/1 45 | 46 | Contributor: https://github.com/Smankusors 47 | 48 | ## Initial release 49 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 stef kariotidis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # No longer maintained 2 | 3 | I wanted to say that the extension is no longer maintained. I do not code often and if/when I code it is not on PHP - Laravel. 4 | 5 | The last couple of years commits where mostly for community's sake but since I am out of the loop I cannot commit to this project. 6 | 7 | ## laravel-goto-controller README 8 | 9 | Alt + click to navigate from a route to a respective controller file. 10 | 11 | Credits to https://github.com/codingyu/laravel-goto-view 12 | 13 | ![laravel-goto-controller](images/laravel-goto-controller.gif) 14 | 15 | ## Alternative path for controllers 16 | 17 | The extension supports non default directory paths, search in settings for `laravel goto controller` and set the desired path 18 | of your application's controllers: 19 | 20 | ![laravel-goto-controller](images/settings-alternative-controllers-path.jpg) 21 | 22 | Marketplace link: https://marketplace.visualstudio.com/items?itemName=stef-k.laravel-goto-controller 23 | 24 | ## For latest updates see the CHANGELOG 25 | -------------------------------------------------------------------------------- /images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stef-k/laravel-goto-controller/2f99959b3933b8e8432bcd4e84497bfd71f28b66/images/icon.png -------------------------------------------------------------------------------- /images/laravel-goto-controller.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stef-k/laravel-goto-controller/2f99959b3933b8e8432bcd4e84497bfd71f28b66/images/laravel-goto-controller.gif -------------------------------------------------------------------------------- /images/settings-alternative-controllers-path.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stef-k/laravel-goto-controller/2f99959b3933b8e8432bcd4e84497bfd71f28b66/images/settings-alternative-controllers-path.jpg -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel-goto-controller", 3 | "version": "0.0.13", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "version": "0.0.13", 9 | "hasInstallScript": true, 10 | "license": "MIT", 11 | "dependencies": { 12 | "n-readlines": "^1.0.0" 13 | }, 14 | "devDependencies": { 15 | "vscode": "^1.1.33", 16 | "@types/mocha": "", 17 | "@types/node": "", 18 | "typescript": "" 19 | }, 20 | "engines": { 21 | "vscode": "^1.18.0" 22 | } 23 | }, 24 | "node_modules/@tootallnate/once": { 25 | "version": "1.1.2", 26 | "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", 27 | "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", 28 | "dev": true, 29 | "engines": { 30 | "node": ">= 6" 31 | } 32 | }, 33 | "node_modules/@types/mocha": { 34 | "version": "8.2.2", 35 | "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.2.tgz", 36 | "integrity": "sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw==", 37 | "dev": true 38 | }, 39 | "node_modules/@types/node": { 40 | "version": "16.0.0", 41 | "resolved": "https://registry.npmjs.org/@types/node/-/node-16.0.0.tgz", 42 | "integrity": "sha512-TmCW5HoZ2o2/z2EYi109jLqIaPIi9y/lc2LmDCWzuCi35bcaQ+OtUh6nwBiFK7SOu25FAU5+YKdqFZUwtqGSdg==", 43 | "dev": true 44 | }, 45 | "node_modules/agent-base": { 46 | "version": "6.0.2", 47 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", 48 | "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", 49 | "dev": true, 50 | "dependencies": { 51 | "debug": "4" 52 | }, 53 | "engines": { 54 | "node": ">= 6.0.0" 55 | } 56 | }, 57 | "node_modules/balanced-match": { 58 | "version": "1.0.2", 59 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 60 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 61 | "dev": true 62 | }, 63 | "node_modules/brace-expansion": { 64 | "version": "1.1.11", 65 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 66 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 67 | "dev": true, 68 | "dependencies": { 69 | "balanced-match": "^1.0.0", 70 | "concat-map": "0.0.1" 71 | } 72 | }, 73 | "node_modules/browser-stdout": { 74 | "version": "1.3.1", 75 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 76 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 77 | "dev": true 78 | }, 79 | "node_modules/buffer-from": { 80 | "version": "1.1.1", 81 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", 82 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", 83 | "dev": true 84 | }, 85 | "node_modules/commander": { 86 | "version": "2.15.1", 87 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", 88 | "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", 89 | "dev": true 90 | }, 91 | "node_modules/concat-map": { 92 | "version": "0.0.1", 93 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 94 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 95 | "dev": true 96 | }, 97 | "node_modules/debug": { 98 | "version": "4.3.2", 99 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", 100 | "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", 101 | "dev": true, 102 | "dependencies": { 103 | "ms": "2.1.2" 104 | }, 105 | "engines": { 106 | "node": ">=6.0" 107 | }, 108 | "peerDependenciesMeta": { 109 | "supports-color": { 110 | "optional": true 111 | } 112 | } 113 | }, 114 | "node_modules/diff": { 115 | "version": "3.5.0", 116 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", 117 | "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", 118 | "dev": true, 119 | "engines": { 120 | "node": ">=0.3.1" 121 | } 122 | }, 123 | "node_modules/es6-promise": { 124 | "version": "4.2.8", 125 | "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", 126 | "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", 127 | "dev": true 128 | }, 129 | "node_modules/es6-promisify": { 130 | "version": "5.0.0", 131 | "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", 132 | "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", 133 | "dev": true, 134 | "dependencies": { 135 | "es6-promise": "^4.0.3" 136 | } 137 | }, 138 | "node_modules/escape-string-regexp": { 139 | "version": "1.0.5", 140 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 141 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 142 | "dev": true, 143 | "engines": { 144 | "node": ">=0.8.0" 145 | } 146 | }, 147 | "node_modules/fs.realpath": { 148 | "version": "1.0.0", 149 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 150 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 151 | "dev": true 152 | }, 153 | "node_modules/glob": { 154 | "version": "7.1.7", 155 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", 156 | "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", 157 | "dev": true, 158 | "dependencies": { 159 | "fs.realpath": "^1.0.0", 160 | "inflight": "^1.0.4", 161 | "inherits": "2", 162 | "minimatch": "^3.0.4", 163 | "once": "^1.3.0", 164 | "path-is-absolute": "^1.0.0" 165 | }, 166 | "engines": { 167 | "node": "*" 168 | }, 169 | "funding": { 170 | "url": "https://github.com/sponsors/isaacs" 171 | } 172 | }, 173 | "node_modules/growl": { 174 | "version": "1.10.5", 175 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", 176 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", 177 | "dev": true, 178 | "engines": { 179 | "node": ">=4.x" 180 | } 181 | }, 182 | "node_modules/has-flag": { 183 | "version": "3.0.0", 184 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 185 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 186 | "dev": true, 187 | "engines": { 188 | "node": ">=4" 189 | } 190 | }, 191 | "node_modules/he": { 192 | "version": "1.1.1", 193 | "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", 194 | "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", 195 | "dev": true, 196 | "bin": { 197 | "he": "bin/he" 198 | } 199 | }, 200 | "node_modules/http-proxy-agent": { 201 | "version": "4.0.1", 202 | "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", 203 | "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", 204 | "dev": true, 205 | "dependencies": { 206 | "@tootallnate/once": "1", 207 | "agent-base": "6", 208 | "debug": "4" 209 | }, 210 | "engines": { 211 | "node": ">= 6" 212 | } 213 | }, 214 | "node_modules/https-proxy-agent": { 215 | "version": "5.0.0", 216 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", 217 | "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", 218 | "dev": true, 219 | "dependencies": { 220 | "agent-base": "6", 221 | "debug": "4" 222 | }, 223 | "engines": { 224 | "node": ">= 6" 225 | } 226 | }, 227 | "node_modules/inflight": { 228 | "version": "1.0.6", 229 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 230 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 231 | "dev": true, 232 | "dependencies": { 233 | "once": "^1.3.0", 234 | "wrappy": "1" 235 | } 236 | }, 237 | "node_modules/inherits": { 238 | "version": "2.0.4", 239 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 240 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 241 | "dev": true 242 | }, 243 | "node_modules/minimatch": { 244 | "version": "3.0.4", 245 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 246 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 247 | "dev": true, 248 | "dependencies": { 249 | "brace-expansion": "^1.1.7" 250 | }, 251 | "engines": { 252 | "node": "*" 253 | } 254 | }, 255 | "node_modules/minimist": { 256 | "version": "0.0.8", 257 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", 258 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", 259 | "dev": true 260 | }, 261 | "node_modules/mkdirp": { 262 | "version": "0.5.1", 263 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", 264 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", 265 | "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", 266 | "dev": true, 267 | "dependencies": { 268 | "minimist": "0.0.8" 269 | }, 270 | "bin": { 271 | "mkdirp": "bin/cmd.js" 272 | } 273 | }, 274 | "node_modules/mocha": { 275 | "version": "5.2.0", 276 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", 277 | "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", 278 | "dev": true, 279 | "dependencies": { 280 | "browser-stdout": "1.3.1", 281 | "commander": "2.15.1", 282 | "debug": "3.1.0", 283 | "diff": "3.5.0", 284 | "escape-string-regexp": "1.0.5", 285 | "glob": "7.1.2", 286 | "growl": "1.10.5", 287 | "he": "1.1.1", 288 | "minimatch": "3.0.4", 289 | "mkdirp": "0.5.1", 290 | "supports-color": "5.4.0" 291 | }, 292 | "bin": { 293 | "_mocha": "bin/_mocha", 294 | "mocha": "bin/mocha" 295 | }, 296 | "engines": { 297 | "node": ">= 4.0.0" 298 | } 299 | }, 300 | "node_modules/mocha/node_modules/debug": { 301 | "version": "3.1.0", 302 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 303 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 304 | "dev": true, 305 | "dependencies": { 306 | "ms": "2.0.0" 307 | } 308 | }, 309 | "node_modules/mocha/node_modules/glob": { 310 | "version": "7.1.2", 311 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", 312 | "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", 313 | "dev": true, 314 | "dependencies": { 315 | "fs.realpath": "^1.0.0", 316 | "inflight": "^1.0.4", 317 | "inherits": "2", 318 | "minimatch": "^3.0.4", 319 | "once": "^1.3.0", 320 | "path-is-absolute": "^1.0.0" 321 | }, 322 | "engines": { 323 | "node": "*" 324 | } 325 | }, 326 | "node_modules/mocha/node_modules/ms": { 327 | "version": "2.0.0", 328 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 329 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", 330 | "dev": true 331 | }, 332 | "node_modules/ms": { 333 | "version": "2.1.2", 334 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 335 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 336 | "dev": true 337 | }, 338 | "node_modules/n-readlines": { 339 | "version": "1.0.1", 340 | "resolved": "https://registry.npmjs.org/n-readlines/-/n-readlines-1.0.1.tgz", 341 | "integrity": "sha512-z4SyAIVgMy7CkgsoNw7YVz40v0g4+WWvvqy8+ZdHrCtgevcEO758WQyrYcw3XPxcLxF+//RszTz/rO48nzD0wQ==", 342 | "engines": { 343 | "node": ">=6.x.x" 344 | } 345 | }, 346 | "node_modules/once": { 347 | "version": "1.4.0", 348 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 349 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 350 | "dev": true, 351 | "dependencies": { 352 | "wrappy": "1" 353 | } 354 | }, 355 | "node_modules/path-is-absolute": { 356 | "version": "1.0.1", 357 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 358 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 359 | "dev": true, 360 | "engines": { 361 | "node": ">=0.10.0" 362 | } 363 | }, 364 | "node_modules/semver": { 365 | "version": "5.7.1", 366 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 367 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 368 | "dev": true, 369 | "bin": { 370 | "semver": "bin/semver" 371 | } 372 | }, 373 | "node_modules/source-map": { 374 | "version": "0.6.1", 375 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 376 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 377 | "dev": true, 378 | "engines": { 379 | "node": ">=0.10.0" 380 | } 381 | }, 382 | "node_modules/source-map-support": { 383 | "version": "0.5.19", 384 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", 385 | "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", 386 | "dev": true, 387 | "dependencies": { 388 | "buffer-from": "^1.0.0", 389 | "source-map": "^0.6.0" 390 | } 391 | }, 392 | "node_modules/supports-color": { 393 | "version": "5.4.0", 394 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", 395 | "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", 396 | "dev": true, 397 | "dependencies": { 398 | "has-flag": "^3.0.0" 399 | }, 400 | "engines": { 401 | "node": ">=4" 402 | } 403 | }, 404 | "node_modules/typescript": { 405 | "version": "4.3.5", 406 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", 407 | "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", 408 | "dev": true, 409 | "bin": { 410 | "tsc": "bin/tsc", 411 | "tsserver": "bin/tsserver" 412 | }, 413 | "engines": { 414 | "node": ">=4.2.0" 415 | } 416 | }, 417 | "node_modules/vscode": { 418 | "version": "1.1.37", 419 | "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.37.tgz", 420 | "integrity": "sha512-vJNj6IlN7IJPdMavlQa1KoFB3Ihn06q1AiN3ZFI/HfzPNzbKZWPPuiU+XkpNOfGU5k15m4r80nxNPlM7wcc0wg==", 421 | "deprecated": "This package is deprecated in favor of @types/vscode and vscode-test. For more information please read: https://code.visualstudio.com/updates/v1_36#_splitting-vscode-package-into-typesvscode-and-vscodetest", 422 | "dev": true, 423 | "dependencies": { 424 | "glob": "^7.1.2", 425 | "http-proxy-agent": "^4.0.1", 426 | "https-proxy-agent": "^5.0.0", 427 | "mocha": "^5.2.0", 428 | "semver": "^5.4.1", 429 | "source-map-support": "^0.5.0", 430 | "vscode-test": "^0.4.1" 431 | }, 432 | "bin": { 433 | "vscode-install": "bin/install" 434 | }, 435 | "engines": { 436 | "node": ">=8.9.3" 437 | } 438 | }, 439 | "node_modules/vscode-test": { 440 | "version": "0.4.3", 441 | "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-0.4.3.tgz", 442 | "integrity": "sha512-EkMGqBSefZH2MgW65nY05rdRSko15uvzq4VAPM5jVmwYuFQKE7eikKXNJDRxL+OITXHB6pI+a3XqqD32Y3KC5w==", 443 | "dev": true, 444 | "dependencies": { 445 | "http-proxy-agent": "^2.1.0", 446 | "https-proxy-agent": "^2.2.1" 447 | }, 448 | "engines": { 449 | "node": ">=8.9.3" 450 | } 451 | }, 452 | "node_modules/vscode-test/node_modules/agent-base": { 453 | "version": "4.3.0", 454 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", 455 | "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", 456 | "dev": true, 457 | "dependencies": { 458 | "es6-promisify": "^5.0.0" 459 | }, 460 | "engines": { 461 | "node": ">= 4.0.0" 462 | } 463 | }, 464 | "node_modules/vscode-test/node_modules/debug": { 465 | "version": "3.1.0", 466 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 467 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 468 | "dev": true, 469 | "dependencies": { 470 | "ms": "2.0.0" 471 | } 472 | }, 473 | "node_modules/vscode-test/node_modules/http-proxy-agent": { 474 | "version": "2.1.0", 475 | "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", 476 | "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", 477 | "dev": true, 478 | "dependencies": { 479 | "agent-base": "4", 480 | "debug": "3.1.0" 481 | }, 482 | "engines": { 483 | "node": ">= 4.5.0" 484 | } 485 | }, 486 | "node_modules/vscode-test/node_modules/https-proxy-agent": { 487 | "version": "2.2.4", 488 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", 489 | "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", 490 | "dev": true, 491 | "dependencies": { 492 | "agent-base": "^4.3.0", 493 | "debug": "^3.1.0" 494 | }, 495 | "engines": { 496 | "node": ">= 4.5.0" 497 | } 498 | }, 499 | "node_modules/vscode-test/node_modules/ms": { 500 | "version": "2.0.0", 501 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 502 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", 503 | "dev": true 504 | }, 505 | "node_modules/wrappy": { 506 | "version": "1.0.2", 507 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 508 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 509 | "dev": true 510 | } 511 | }, 512 | "dependencies": { 513 | "@tootallnate/once": { 514 | "version": "1.1.2", 515 | "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", 516 | "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", 517 | "dev": true 518 | }, 519 | "@types/mocha": { 520 | "version": "8.2.2", 521 | "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.2.tgz", 522 | "integrity": "sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw==", 523 | "dev": true 524 | }, 525 | "@types/node": { 526 | "version": "16.0.0", 527 | "resolved": "https://registry.npmjs.org/@types/node/-/node-16.0.0.tgz", 528 | "integrity": "sha512-TmCW5HoZ2o2/z2EYi109jLqIaPIi9y/lc2LmDCWzuCi35bcaQ+OtUh6nwBiFK7SOu25FAU5+YKdqFZUwtqGSdg==", 529 | "dev": true 530 | }, 531 | "agent-base": { 532 | "version": "6.0.2", 533 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", 534 | "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", 535 | "dev": true, 536 | "requires": { 537 | "debug": "4" 538 | } 539 | }, 540 | "balanced-match": { 541 | "version": "1.0.2", 542 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 543 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 544 | "dev": true 545 | }, 546 | "brace-expansion": { 547 | "version": "1.1.11", 548 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 549 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 550 | "dev": true, 551 | "requires": { 552 | "balanced-match": "^1.0.0", 553 | "concat-map": "0.0.1" 554 | } 555 | }, 556 | "browser-stdout": { 557 | "version": "1.3.1", 558 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 559 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 560 | "dev": true 561 | }, 562 | "buffer-from": { 563 | "version": "1.1.1", 564 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", 565 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", 566 | "dev": true 567 | }, 568 | "commander": { 569 | "version": "2.15.1", 570 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", 571 | "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", 572 | "dev": true 573 | }, 574 | "concat-map": { 575 | "version": "0.0.1", 576 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 577 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 578 | "dev": true 579 | }, 580 | "debug": { 581 | "version": "4.3.2", 582 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", 583 | "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", 584 | "dev": true, 585 | "requires": { 586 | "ms": "2.1.2" 587 | } 588 | }, 589 | "diff": { 590 | "version": "3.5.0", 591 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", 592 | "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", 593 | "dev": true 594 | }, 595 | "es6-promise": { 596 | "version": "4.2.8", 597 | "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", 598 | "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", 599 | "dev": true 600 | }, 601 | "es6-promisify": { 602 | "version": "5.0.0", 603 | "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", 604 | "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", 605 | "dev": true, 606 | "requires": { 607 | "es6-promise": "^4.0.3" 608 | } 609 | }, 610 | "escape-string-regexp": { 611 | "version": "1.0.5", 612 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 613 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 614 | "dev": true 615 | }, 616 | "fs.realpath": { 617 | "version": "1.0.0", 618 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 619 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 620 | "dev": true 621 | }, 622 | "glob": { 623 | "version": "7.1.7", 624 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", 625 | "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", 626 | "dev": true, 627 | "requires": { 628 | "fs.realpath": "^1.0.0", 629 | "inflight": "^1.0.4", 630 | "inherits": "2", 631 | "minimatch": "^3.0.4", 632 | "once": "^1.3.0", 633 | "path-is-absolute": "^1.0.0" 634 | } 635 | }, 636 | "growl": { 637 | "version": "1.10.5", 638 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", 639 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", 640 | "dev": true 641 | }, 642 | "has-flag": { 643 | "version": "3.0.0", 644 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 645 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 646 | "dev": true 647 | }, 648 | "he": { 649 | "version": "1.1.1", 650 | "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", 651 | "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", 652 | "dev": true 653 | }, 654 | "http-proxy-agent": { 655 | "version": "4.0.1", 656 | "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", 657 | "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", 658 | "dev": true, 659 | "requires": { 660 | "@tootallnate/once": "1", 661 | "agent-base": "6", 662 | "debug": "4" 663 | } 664 | }, 665 | "https-proxy-agent": { 666 | "version": "5.0.0", 667 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", 668 | "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", 669 | "dev": true, 670 | "requires": { 671 | "agent-base": "6", 672 | "debug": "4" 673 | } 674 | }, 675 | "inflight": { 676 | "version": "1.0.6", 677 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 678 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 679 | "dev": true, 680 | "requires": { 681 | "once": "^1.3.0", 682 | "wrappy": "1" 683 | } 684 | }, 685 | "inherits": { 686 | "version": "2.0.4", 687 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 688 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 689 | "dev": true 690 | }, 691 | "minimatch": { 692 | "version": "3.0.4", 693 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 694 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 695 | "dev": true, 696 | "requires": { 697 | "brace-expansion": "^1.1.7" 698 | } 699 | }, 700 | "minimist": { 701 | "version": "0.0.8", 702 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", 703 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", 704 | "dev": true 705 | }, 706 | "mkdirp": { 707 | "version": "0.5.1", 708 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", 709 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", 710 | "dev": true, 711 | "requires": { 712 | "minimist": "0.0.8" 713 | } 714 | }, 715 | "mocha": { 716 | "version": "5.2.0", 717 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", 718 | "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", 719 | "dev": true, 720 | "requires": { 721 | "browser-stdout": "1.3.1", 722 | "commander": "2.15.1", 723 | "debug": "3.1.0", 724 | "diff": "3.5.0", 725 | "escape-string-regexp": "1.0.5", 726 | "glob": "7.1.2", 727 | "growl": "1.10.5", 728 | "he": "1.1.1", 729 | "minimatch": "3.0.4", 730 | "mkdirp": "0.5.1", 731 | "supports-color": "5.4.0" 732 | }, 733 | "dependencies": { 734 | "debug": { 735 | "version": "3.1.0", 736 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 737 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 738 | "dev": true, 739 | "requires": { 740 | "ms": "2.0.0" 741 | } 742 | }, 743 | "glob": { 744 | "version": "7.1.2", 745 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", 746 | "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", 747 | "dev": true, 748 | "requires": { 749 | "fs.realpath": "^1.0.0", 750 | "inflight": "^1.0.4", 751 | "inherits": "2", 752 | "minimatch": "^3.0.4", 753 | "once": "^1.3.0", 754 | "path-is-absolute": "^1.0.0" 755 | } 756 | }, 757 | "ms": { 758 | "version": "2.0.0", 759 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 760 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", 761 | "dev": true 762 | } 763 | } 764 | }, 765 | "ms": { 766 | "version": "2.1.2", 767 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 768 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 769 | "dev": true 770 | }, 771 | "n-readlines": { 772 | "version": "1.0.1", 773 | "resolved": "https://registry.npmjs.org/n-readlines/-/n-readlines-1.0.1.tgz", 774 | "integrity": "sha512-z4SyAIVgMy7CkgsoNw7YVz40v0g4+WWvvqy8+ZdHrCtgevcEO758WQyrYcw3XPxcLxF+//RszTz/rO48nzD0wQ==" 775 | }, 776 | "once": { 777 | "version": "1.4.0", 778 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 779 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 780 | "dev": true, 781 | "requires": { 782 | "wrappy": "1" 783 | } 784 | }, 785 | "path-is-absolute": { 786 | "version": "1.0.1", 787 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 788 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 789 | "dev": true 790 | }, 791 | "semver": { 792 | "version": "5.7.1", 793 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 794 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 795 | "dev": true 796 | }, 797 | "source-map": { 798 | "version": "0.6.1", 799 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 800 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 801 | "dev": true 802 | }, 803 | "source-map-support": { 804 | "version": "0.5.19", 805 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", 806 | "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", 807 | "dev": true, 808 | "requires": { 809 | "buffer-from": "^1.0.0", 810 | "source-map": "^0.6.0" 811 | } 812 | }, 813 | "supports-color": { 814 | "version": "5.4.0", 815 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", 816 | "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", 817 | "dev": true, 818 | "requires": { 819 | "has-flag": "^3.0.0" 820 | } 821 | }, 822 | "typescript": { 823 | "version": "4.3.5", 824 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", 825 | "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", 826 | "dev": true 827 | }, 828 | "vscode": { 829 | "version": "1.1.37", 830 | "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.37.tgz", 831 | "integrity": "sha512-vJNj6IlN7IJPdMavlQa1KoFB3Ihn06q1AiN3ZFI/HfzPNzbKZWPPuiU+XkpNOfGU5k15m4r80nxNPlM7wcc0wg==", 832 | "dev": true, 833 | "requires": { 834 | "glob": "^7.1.2", 835 | "http-proxy-agent": "^4.0.1", 836 | "https-proxy-agent": "^5.0.0", 837 | "mocha": "^5.2.0", 838 | "semver": "^5.4.1", 839 | "source-map-support": "^0.5.0", 840 | "vscode-test": "^0.4.1" 841 | } 842 | }, 843 | "vscode-test": { 844 | "version": "0.4.3", 845 | "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-0.4.3.tgz", 846 | "integrity": "sha512-EkMGqBSefZH2MgW65nY05rdRSko15uvzq4VAPM5jVmwYuFQKE7eikKXNJDRxL+OITXHB6pI+a3XqqD32Y3KC5w==", 847 | "dev": true, 848 | "requires": { 849 | "http-proxy-agent": "^2.1.0", 850 | "https-proxy-agent": "^2.2.1" 851 | }, 852 | "dependencies": { 853 | "agent-base": { 854 | "version": "4.3.0", 855 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", 856 | "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", 857 | "dev": true, 858 | "requires": { 859 | "es6-promisify": "^5.0.0" 860 | } 861 | }, 862 | "debug": { 863 | "version": "3.1.0", 864 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 865 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 866 | "dev": true, 867 | "requires": { 868 | "ms": "2.0.0" 869 | } 870 | }, 871 | "http-proxy-agent": { 872 | "version": "2.1.0", 873 | "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", 874 | "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", 875 | "dev": true, 876 | "requires": { 877 | "agent-base": "4", 878 | "debug": "3.1.0" 879 | } 880 | }, 881 | "https-proxy-agent": { 882 | "version": "2.2.4", 883 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", 884 | "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", 885 | "dev": true, 886 | "requires": { 887 | "agent-base": "^4.3.0", 888 | "debug": "^3.1.0" 889 | } 890 | }, 891 | "ms": { 892 | "version": "2.0.0", 893 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 894 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", 895 | "dev": true 896 | } 897 | } 898 | }, 899 | "wrappy": { 900 | "version": "1.0.2", 901 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 902 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 903 | "dev": true 904 | } 905 | } 906 | } 907 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel-goto-controller", 3 | "displayName": "laravel-goto-controller", 4 | "description": "Alt + click to navigate from a route to a respective controller file", 5 | "version": "0.0.15", 6 | "publisher": "stef-k", 7 | "engines": { 8 | "vscode": "^1.18.0" 9 | }, 10 | "categories": [ 11 | "Other" 12 | ], 13 | "galleryBanner": { 14 | "color": "#FF544A", 15 | "theme": "light" 16 | }, 17 | "activationEvents": [ 18 | "*" 19 | ], 20 | "icon": "images/icon.png", 21 | "main": "./out/extension", 22 | "scripts": { 23 | "vscode:prepublish": "npm run compile", 24 | "compile": "tsc -p ./", 25 | "watch": "tsc -watch -p ./", 26 | "postinstall": "node ./node_modules/vscode/bin/install", 27 | "test": "npm run compile && node ./node_modules/vscode/bin/test" 28 | }, 29 | "devDependencies": { 30 | "@types/mocha": "", 31 | "@types/node": "", 32 | "typescript": "", 33 | "vscode": "^1.1.33" 34 | }, 35 | "dependencies": { 36 | "n-readlines": "^1.0.0" 37 | }, 38 | "license": "MIT", 39 | "repository": { 40 | "type": "git", 41 | "url": "https://github.com/stef-k/laravel-goto-controller.git" 42 | }, 43 | "bugs": { 44 | "url": "https://github.com/stef-k/laravel-goto-controller/issues" 45 | }, 46 | "homepage": "https://github.com/stef-k/laravel-goto-controller/blob/master/README.md", 47 | "contributes": { 48 | "configuration": { 49 | "type": "object", 50 | "title": "Laravel goto controller configuration", 51 | "properties": { 52 | "laravel_goto_controller.pathController": { 53 | "type": "string", 54 | "default": "/app/Http/Controllers", 55 | "description": "Root path to the controllers folder" 56 | } 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/extension.ts: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import { workspace, languages, Hover, ExtensionContext } from 'vscode'; 4 | import { LinkProvider } from './link'; 5 | import * as util from './util'; 6 | 7 | const REG = /(['"])[^'"]*\1/; 8 | 9 | export function activate(context: ExtensionContext) { 10 | let hover = languages.registerHoverProvider({scheme: 'file', language: 'php'}, { 11 | provideHover(document, position, token) { 12 | let linkRange = document.getWordRangeAtPosition(position, REG); 13 | if (linkRange) { 14 | let filePath = util.getFilePath(document.getText(linkRange), document); 15 | let workspaceFolder = workspace.getWorkspaceFolder(document.uri); 16 | if (filePath != null) { 17 | return new Hover(workspaceFolder.name + filePath.replace(workspaceFolder.uri.fsPath, '')); 18 | } 19 | } 20 | return; 21 | } 22 | }); 23 | let link = languages.registerDocumentLinkProvider({scheme: 'file', language: 'php'}, new LinkProvider()); 24 | context.subscriptions.push(hover); 25 | context.subscriptions.push(link); 26 | } 27 | 28 | export function deactivate() { 29 | // 30 | } 31 | -------------------------------------------------------------------------------- /src/link.ts: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import { workspace, Position, Range, CancellationToken, DocumentLink, DocumentLinkProvider, TextDocument, Uri, ProviderResult, commands } from 'vscode'; 4 | import * as util from './util'; 5 | 6 | export class LinkProvider implements DocumentLinkProvider { 7 | /** 8 | * provideDocumentLinks 9 | */ 10 | public provideDocumentLinks (document: TextDocument, token: CancellationToken): ProviderResult { 11 | let documentLinks = []; 12 | let index = 0; 13 | let reg = /(['"])[^'"]*\1/g; 14 | while (index < document.lineCount) { 15 | let line = document.lineAt(index); 16 | let result = line.text.match(reg); 17 | 18 | if (result != null) { 19 | for (let item of result) { 20 | let splitted = item.replace(/\"|\'/g, '').split('@'); 21 | if (splitted.length != 2) { 22 | //Search for the Controller keyword in the string name 23 | if (splitted[0].includes('Controller')) { 24 | //In this case, because there is no method definition in routes 25 | //we send it to the index method by default 26 | splitted[1] = 'index'; 27 | } else { 28 | continue; 29 | } 30 | } 31 | 32 | let filePath = util.getFilePath(splitted[0], document); 33 | 34 | if (filePath != null) { 35 | let start = new Position(line.lineNumber, line.text.indexOf(item) + 1); 36 | let end = start.translate(0, item.length - 2); 37 | let documentLink = new util.LaravelControllerLink(new Range(start, end), filePath, splitted[0], splitted[1]); 38 | documentLinks.push(documentLink); 39 | } 40 | } 41 | } 42 | // check for ClassName::class notation 43 | if (line.text.includes('::class')) { 44 | let controllerName = line.text.substring(line.text.lastIndexOf('[') + 1, line.text.lastIndexOf('::class')) 45 | let functionName = line.text.split('::class, \'')[1].substring(0, line.text.split('::class, \'')[1].lastIndexOf('\'')) 46 | let functionCharacterStartsAt = line.text.lastIndexOf(line.text.split('::class, \'')[1][0]) 47 | let filePath = util.getFilePath(controllerName, document); 48 | 49 | if (filePath != null) { 50 | let start = new Position(line.lineNumber, functionCharacterStartsAt); 51 | let end = start.translate(0, functionName.length); 52 | let documentLink = new util.LaravelControllerLink(new Range(start, end), filePath, controllerName, functionName); 53 | documentLinks.push(documentLink); 54 | } 55 | } 56 | index++; 57 | } 58 | return documentLinks; 59 | } 60 | 61 | /** 62 | * resolveDocumentLink 63 | */ 64 | public resolveDocumentLink (link: util.LaravelControllerLink, token: CancellationToken): ProviderResult { 65 | let lineNum = util.getLineNumber(link.funcName, link.filePath); 66 | let path = link.filePath; 67 | if (lineNum != -1) 68 | path += "#" + lineNum; 69 | 70 | link.target = Uri.parse("file:" + path); 71 | return link; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/test/extension.test.ts: -------------------------------------------------------------------------------- 1 | // 2 | // Note: This example test is leveraging the Mocha test framework. 3 | // Please refer to their documentation on https://mochajs.org/ for help. 4 | // 5 | 6 | // The module 'assert' provides assertion methods from node 7 | import * as assert from 'assert'; 8 | 9 | // You can import and use all API from the 'vscode' module 10 | // as well as import your extension to test it 11 | import * as vscode from 'vscode'; 12 | import * as myExtension from '../extension'; 13 | 14 | // Defines a Mocha test suite to group tests of similar kind together 15 | suite("Extension Tests", () => { 16 | 17 | // Defines a Mocha unit test 18 | test("Something 1", () => { 19 | assert.equal(-1, [1, 2, 3].indexOf(5)); 20 | assert.equal(-1, [1, 2, 3].indexOf(0)); 21 | }); 22 | }); -------------------------------------------------------------------------------- /src/test/index.ts: -------------------------------------------------------------------------------- 1 | // 2 | // PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING 3 | // 4 | // This file is providing the test runner to use when running extension tests. 5 | // By default the test runner in use is Mocha based. 6 | // 7 | // You can provide your own test runner if you want to override it by exporting 8 | // a function run(testRoot: string, clb: (error:Error) => void) that the extension 9 | // host can call to run the tests. The test runner is expected to use console.log 10 | // to report the results back to the caller. When the tests are finished, return 11 | // a possible error to the callback or null if none. 12 | 13 | import * as testRunner from 'vscode/lib/testrunner'; 14 | 15 | // You can directly control Mocha options by uncommenting the following lines 16 | // See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info 17 | testRunner.configure({ 18 | ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.) 19 | useColors: true // colored output from test results 20 | }); 21 | 22 | module.exports = testRunner; -------------------------------------------------------------------------------- /src/util.ts: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import { workspace, TextDocument, DocumentLink, Range, Uri } from 'vscode'; 4 | import * as fs from 'fs'; 5 | import * as readLine from 'n-readlines'; 6 | 7 | export class LaravelControllerLink extends DocumentLink { 8 | filePath: string; 9 | funcName: string; 10 | controllerName: string; 11 | constructor(range: Range, path: string, controllerName: string, funcName: string) { 12 | super(range, null); 13 | this.filePath = path; 14 | this.controllerName = controllerName; 15 | this.funcName = funcName; 16 | } 17 | } 18 | 19 | /** 20 | * Finds the controler's filepath 21 | * @param text 22 | * @param document 23 | */ 24 | export function getFilePath(text: string, document: TextDocument) { 25 | let pathCtrl = '/app/Http/Controllers'; // initial pathController value in package.json 26 | pathCtrl = workspace.getConfiguration('laravel_goto_controller').pathController; // default settings or user settings 27 | let filePath = workspace.getWorkspaceFolder(document.uri).uri.fsPath + pathCtrl; 28 | // split the method (if not a resource controller) from the controller name 29 | let controllerFileName = text.replace(/\./g, '/').replace(/\"|\'/g, '') + '.php'; 30 | 31 | if (controllerFileName.includes('\\')) { 32 | controllerFileName = controllerFileName.replace(/\\/g, '\/'); 33 | } 34 | 35 | let targetPath = filePath + '/' + controllerFileName; 36 | 37 | if (fs.existsSync(targetPath)) { 38 | return targetPath; 39 | } 40 | let dirItems = fs.readdirSync(filePath); 41 | for (let item of dirItems) { 42 | targetPath = filePath + '/' + item + '/' + controllerFileName; 43 | if (fs.existsSync(targetPath)) { 44 | return targetPath; 45 | } 46 | } 47 | return null; 48 | } 49 | 50 | export function getLineNumber(text: string, path: string) { 51 | let file = new readLine(path); 52 | let lineNum = 0; 53 | let line: string; 54 | while (line = file.next()) { 55 | lineNum++; 56 | line = line.toString(); 57 | if (line.toLowerCase().includes('function ' + text.toLowerCase() + '(')) { 58 | return lineNum; 59 | } 60 | } 61 | return -1; 62 | } 63 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "outDir": "out", 6 | "lib": [ 7 | "es6" 8 | ], 9 | "sourceMap": true, 10 | "rootDir": "src" 11 | }, 12 | "exclude": [ 13 | "node_modules", 14 | ".vscode-test" 15 | ] 16 | } --------------------------------------------------------------------------------