Commit Graph

4054 Commits

Author SHA1 Message Date
Anders Starcke Henriksen
c7bb22c312 Merge pull request #2299 from github/v1.8.2
Some checks failed
Release / Release (push) Has been cancelled
Release / Publish to VS Code Marketplace (push) Has been cancelled
Release / Publish to Open VSX Registry (push) Has been cancelled
v1.8.2
v1.8.2
2023-04-12 14:52:57 +02:00
Anders Starcke Henriksen
3c8dc04845 v1.8.2 2023-04-12 14:26:17 +02:00
Koen Vlaswinkel
b0940e6da9 Merge pull request #2279 from github/koesie10/fix-result-view-selected
Fix empty result view when switching between queries
2023-04-11 17:33:58 +02:00
Robert
048428b237 Merge pull request #2294 from github/robertbrignull/no_distribution_install
Don't rate limit if no CLI is installed
2023-04-11 16:18:55 +01:00
Koen Vlaswinkel
957f71c9d4 Merge pull request #2293 from github/koesie10/use-data-extensions-in-editor
Use data extensions for finding external API calls
2023-04-11 16:01:26 +02:00
Robert
361cb60044 Don't rate limit if no CLI is installed 2023-04-11 12:45:48 +01:00
Koen Vlaswinkel
ae08a1b598 Use data extensions for finding external API calls
The data extension editor was only using the default data extensions
found in the `ql` submodule to find external API calls. This will add
support for using data extensions found in the workspace.

Rather than using the `codeQL.runningQueries.useExtensionPacks` setting,
this will always include data extensions since the editor doesn't make
sense to use without data extensions. We will also forbid the user from
opening this view unless they are using a CLI which supports data
extension packs.
2023-04-11 13:31:51 +02:00
Charis Kyriakou
deb2b83642 Update selected code flow when data flow paths change (#2288) 2023-04-11 11:02:03 +01:00
Koen Vlaswinkel
0115259778 Merge pull request #2271 from github/koesie10/data-extension-editor-cli-tests
Split and add tests for external API usages query
2023-04-11 11:46:29 +02:00
Koen Vlaswinkel
ccf9466fd9 Merge pull request #2260 from github/koesie10/data-extension-editor-stories
Add stories for data extension editor
2023-04-11 11:19:04 +02:00
Koen Vlaswinkel
6dfa726110 Merge remote-tracking branch 'origin/main' into koesie10/data-extension-editor-cli-tests 2023-04-11 11:13:07 +02:00
Koen Vlaswinkel
9f3baadee9 Rename getResults to readQueryResults 2023-04-11 11:10:45 +02:00
Koen Vlaswinkel
ad3a728012 Merge pull request #2267 from github/koesie10/data-extension-editor-generate-flow-model
Add generating of flow model to data extension editor
2023-04-11 11:07:30 +02:00
Koen Vlaswinkel
24c40af78f Add comment to @ts-ignore 2023-04-11 10:31:37 +02:00
Koen Vlaswinkel
41e0dc2961 Remove unnecessary null check 2023-04-11 10:30:32 +02:00
Koen Vlaswinkel
102976e167 Use functions instead of class for generating flow model
We were using a single-use class for generating the flow model, while we
are actually able to do it using two functions. This is more in line
with our existing codebase.
2023-04-11 10:27:46 +02:00
Koen Vlaswinkel
4e8df309fb Add comments for adding flow database 2023-04-11 10:22:10 +02:00
Nora
36f7555fdd Merge pull request #2281 from github/nora/refactor-repo-task
Repo task:  new data model and mapping
2023-04-06 18:12:19 +02:00
Nora
2cb5928cd8 Remove unnecessary directory creation that is handled by outputJson 2023-04-06 14:58:29 +00:00
Nora
2963d7eb5f Remove unnecessary return statements in repo task and repo states 2023-04-06 14:58:29 +00:00
Nora
1beddf7640 Map data types 2023-04-06 14:58:29 +00:00
Nora
f21117e5dd Extract read and write to store 2023-04-06 14:58:29 +00:00
Koen Vlaswinkel
dbc7f90c20 Throw error instead of returning undefined 2023-04-06 16:54:20 +02:00
Koen Vlaswinkel
af8e0bb454 Rename getAddsTo 2023-04-06 16:49:20 +02:00
Koen Vlaswinkel
18db74ed2d Add type check for query results 2023-04-06 16:35:04 +02:00
Koen Vlaswinkel
d5403ad926 Introduce type for modeled method with signature 2023-04-06 16:33:43 +02:00
Koen Vlaswinkel
fcc937657d Merge pull request #2280 from github/koesie10/fix-webview-disposed
Fix error when closing MRVA webview during extension activation
2023-04-06 16:33:26 +02:00
Koen Vlaswinkel
0d00e5c5b7 Remove undefined from readModeledMethod return type 2023-04-06 16:27:34 +02:00
Koen Vlaswinkel
3214a376ad Clarify definitions to be extensible predicate definitions 2023-04-06 16:24:25 +02:00
Koen Vlaswinkel
5a3a1a5cd7 Add comment for flow model progress 2023-04-06 16:23:10 +02:00
Koen Vlaswinkel
d3ff87ab71 Update language used for generating modeled methods 2023-04-06 16:21:48 +02:00
Koen Vlaswinkel
42d4034744 Extract getting ql submodule folder to function 2023-04-06 16:20:01 +02:00
Koen Vlaswinkel
4fa229f8a2 Rename generateExternalApi to generateModeledMethods 2023-04-06 16:16:37 +02:00
Nora
15a9093c98 Merge pull request #2270 from github/nora/model-repo-states
Repo States: new data model and mapping
2023-04-06 15:26:26 +02:00
Nora
1595d6f4aa Fix default and use assertNever 2023-04-06 12:59:30 +00:00
Koen Vlaswinkel
6c95ac7c79 Fix error when closing MRVA webview during extension activation
This fixes the "Webview is disposed" error which occurs when the user
closes the variant analysis webview while the extension is still
activating. We will now check whether the webview is disposed before
restoring the view.
2023-04-06 14:57:58 +02:00
Nora
103070ee7a Use shorthand 2023-04-06 12:52:45 +00:00
Nora
7e3c0265fe Use new methods in test 2023-04-06 12:49:14 +00:00
Nora
8eaf1e9adc Retain error message 2023-04-06 12:48:53 +00:00
Koen Vlaswinkel
978af54e2a Fix potential concurrency bug in results view
This was pointed out by CodeQL: when calling `setState` and using
`this.props`, it may not be up-to-date because `setState` may run
concurrently. Therefore, we should use the `setState` callback variant
to ensure we get the latest props.

This refactors the code a bit to ensure we're not using `this.props`
anywhere, including in the `getResultSets` function which is called
in the `setState` callback.
2023-04-06 14:25:11 +02:00
Koen Vlaswinkel
84928fa2fe Add test for empty result view bug 2023-04-06 14:10:58 +02:00
Koen Vlaswinkel
2a4a91207a Fix empty result view when switching between queries
When updating to React 18, we removed the loading step from the updating
of the state of the result view since React would batch the updates
anyway. However, this caused a bug where the result view would be empty
when switching between queries. This is because the result view would
retain the old selected result set name. This would not happen
previously because React would re-render the view at least once, which
would cause the result view to be unmounted and re-created.

This fixes it by resetting the selected result set if we can't find the
result set in the new result sets.
2023-04-06 13:58:15 +02:00
Koen Vlaswinkel
bb05220b2c Fix Babel compilation error
The default Storybook Babel config did not recognize the `public`
keyword in our custom errors (e.g. `ExhaustivityCheckingError`
and `RedactableError`). To fix this, we can use Storybook's V7 mode to
supply a custom Babel config. This fixes the compilation error.

See: https://storybook.js.org/docs/react/configure/babel
2023-04-06 13:35:10 +02:00
Koen Vlaswinkel
1bcc13af7c Add story for DataExtensionsEditor 2023-04-06 13:35:04 +02:00
Koen Vlaswinkel
3ae16d9534 Add story for MethodRow 2023-04-06 13:32:10 +02:00
Koen Vlaswinkel
0b1b03d5b0 Merge remote-tracking branch 'origin/main' into koesie10/data-extension-editor-cli-tests 2023-04-06 12:46:36 +02:00
Koen Vlaswinkel
083cf44f66 Merge remote-tracking branch 'origin/main' into koesie10/data-extension-editor-generate-flow-model 2023-04-06 12:43:51 +02:00
Koen Vlaswinkel
3628f4bf36 Merge pull request #2266 from github/koesie10/data-extension-editor-jump-to-usage
Add link to example usage in data extensions editor
2023-04-06 12:18:35 +02:00
Nora
3f5bc85004 Map enum properly 2023-04-06 09:58:08 +00:00
Nora
14ad348f24 new repo states data type and mapping 2023-04-06 09:58:07 +00:00