-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On Premise Connection Configuration (#176)
* On Premise Connection Configuration * Add initial approach of onPremiseConnection factory method --------- Co-authored-by: Robert Maloney <[email protected]> Co-authored-by: Ryan Wersal <[email protected]>
- Loading branch information
1 parent
12b1c25
commit 644695a
Showing
6 changed files
with
91 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
packages/spectral/src/types-tests/ConnectionDefinition.test-d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import { expectAssignable, expectNotAssignable } from "tsd"; | ||
import { onPremiseConnection, OnPremiseConnectionDefinition } from ".."; | ||
|
||
const valid = onPremiseConnection({ | ||
key: "basic", | ||
label: "Basic Connection", | ||
inputs: { | ||
host: { | ||
label: "Host", | ||
placeholder: "Host", | ||
type: "string", | ||
required: true, | ||
shown: true, | ||
onPremiseControlled: true, | ||
example: "192.168.0.1", | ||
}, | ||
port: { | ||
label: "Port", | ||
placeholder: "Port", | ||
type: "string", | ||
required: true, | ||
shown: true, | ||
onPremiseControlled: true, | ||
default: "1433", | ||
}, | ||
username: { | ||
label: "Username", | ||
placeholder: "Username", | ||
type: "string", | ||
required: false, | ||
shown: true, | ||
}, | ||
password: { | ||
label: "Password", | ||
placeholder: "Password", | ||
type: "password", | ||
required: false, | ||
shown: true, | ||
}, | ||
}, | ||
}); | ||
expectAssignable<OnPremiseConnectionDefinition>(valid); | ||
|
||
const invalid = { | ||
key: "basic", | ||
label: "Basic Connection", | ||
inputs: { | ||
username: { | ||
label: "Username", | ||
placeholder: "Username", | ||
type: "string", | ||
required: false, | ||
shown: true, | ||
}, | ||
password: { | ||
label: "Password", | ||
placeholder: "Password", | ||
type: "password", | ||
required: false, | ||
shown: true, | ||
}, | ||
}, | ||
}; | ||
expectNotAssignable<OnPremiseConnectionDefinition>(invalid); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters