File tree Expand file tree Collapse file tree 2 files changed +128
-227
lines changed
extensions/ql-vscode/test Expand file tree Collapse file tree 2 files changed +128
-227
lines changed Original file line number Diff line number Diff line change 1+ import {
2+ DbConfig ,
3+ ExpandedDbItem ,
4+ LocalDatabase ,
5+ LocalList ,
6+ RemoteRepositoryList ,
7+ SelectedDbItem ,
8+ } from "../../src/databases/config/db-config" ;
9+
10+ export function createDbConfig ( {
11+ remoteLists = [ ] ,
12+ remoteOwners = [ ] ,
13+ remoteRepos = [ ] ,
14+ localLists = [ ] ,
15+ localDbs = [ ] ,
16+ selected = undefined ,
17+ expanded = [ ] ,
18+ } : {
19+ remoteLists ?: RemoteRepositoryList [ ] ;
20+ remoteOwners ?: string [ ] ;
21+ remoteRepos ?: string [ ] ;
22+ localLists ?: LocalList [ ] ;
23+ localDbs ?: LocalDatabase [ ] ;
24+ selected ?: SelectedDbItem ;
25+ expanded ?: ExpandedDbItem [ ] ;
26+ } = { } ) : DbConfig {
27+ return {
28+ databases : {
29+ remote : {
30+ repositoryLists : remoteLists ,
31+ owners : remoteOwners ,
32+ repositories : remoteRepos ,
33+ } ,
34+ local : {
35+ lists : localLists ,
36+ databases : localDbs ,
37+ } ,
38+ } ,
39+ expanded,
40+ selected,
41+ } ;
42+ }
You can’t perform that action at this time.
0 commit comments