From aad50faf858dbcf2b74b69da23cd74a78a261557 Mon Sep 17 00:00:00 2001 From: Joe Afflerbach Date: Fri, 2 Dec 2022 08:38:18 +0100 Subject: [PATCH 1/2] Jump to `proxy` block definition --- src/definition.js | 4 ++-- src/schema.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/definition.js b/src/definition.js index 68d2088..eff4d29 100644 --- a/src/definition.js +++ b/src/definition.js @@ -56,8 +56,8 @@ function getReference(document, position) { // access_control = [...], disable_access_control = [...] let matches = lineText.match(new RegExp('^\\s*((?:disable_)?access_control)\\s*=\\s*\\[.*?"' + escapedWord + '"', 'm')) if (matches === null) { - // backend = "..." - matches = lineText.match(new RegExp('^\\s*((?:configuration_|jwks_uri_|userinfo_|token_)?backend)\\s*=\\s*"' + escapedWord + '"', 'm')) + // backend = "..." / ..._backend = "..." / proxy = "..." + matches = lineText.match(new RegExp('^\\s*((?:configuration_|jwks_uri_|userinfo_|token_)?backend|proxy)\\s*=\\s*"' + escapedWord + '"', 'm')) if (matches === null) { // backend "..." { ... matches = lineText.match(new RegExp('^\\s*(backend)\\s*"' + escapedWord + '"\\s*{', 'm')) diff --git a/src/schema.js b/src/schema.js index d9253f1..ecedd90 100644 --- a/src/schema.js +++ b/src/schema.js @@ -558,7 +558,8 @@ const attributes = { type: 'number' }, proxy: { // (label reference in endpoints) - parents: ['backend', 'endpoint'] + parents: ['backend', 'endpoint'], + definingBlocks: ["proxy"] }, query_params: { parents: ['beta_token_request', 'request'], From b84dfb4632971e16b4b804bb95e83022941c27af Mon Sep 17 00:00:00 2001 From: Joe Afflerbach Date: Fri, 2 Dec 2022 08:39:29 +0100 Subject: [PATCH 2/2] Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5173ec..ad46a54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Added - completion for `beta_job` block and its attributes [#117](https://github.com/avenga/couper-vscode/pull/117) +- jump to proxy definition [#118](https://github.com/avenga/couper-vscode/pull/118) ---