Skip to content

Commit

Permalink
feat: types for https config (#368)
Browse files Browse the repository at this point in the history
* types for https config

* extend config
  • Loading branch information
ddhp authored Jun 24, 2020
1 parent adb434f commit aa4aa83
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions core/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,19 @@ declare module '@verdaccio/types' {
sort_packages?: string;
}

interface HttpsConf {
key?: string;
cert?: string;
interface HttpsConfKeyCert {
key: string;
cert: string;
ca?: string;
pfx?: string;
}

interface HttpsConfPfx {
pfx: string;
passphrase?: string;
}

type HttpsConf = HttpsConfKeyCert | HttpsConfPfx;

interface JWTOptions {
sign: JWTSignOptions;
verify: JWTVerifyOptions;
Expand Down Expand Up @@ -365,6 +370,10 @@ declare module '@verdaccio/types' {
[key: string]: any;
}

interface ConfigWithHttps extends Config {
https: HttpsConf;
}

interface ITokenActions {
saveToken(token: Token): Promise<any>;
deleteToken(user: string, tokenKey: string): Promise<any>;
Expand Down

0 comments on commit aa4aa83

Please sign in to comment.