File tree Expand file tree Collapse file tree 3 files changed +23
-23
lines changed
Expand file tree Collapse file tree 3 files changed +23
-23
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * SSH Config interface
3+ *
4+ * Note that this interface atypically capitalizes field names. This is for consistency
5+ * with SSH config files.
6+ */
7+
8+ /**
9+ * ConfigResolvers take a config, resolve some additional data (perhaps using
10+ * a config file), and return a new Config.
11+ */
12+ declare module 'ssh-config' {
13+ export type ConfigResolver = ( config : Config ) => Config ;
14+
15+ export type Config = Record < string , string > ;
16+
17+ export class SSHConfig {
18+ compute : ( host : string ) => Config ;
19+ }
20+
21+ export function parse ( config : string ) : SSHConfig ;
22+ }
Original file line number Diff line number Diff line change 1- /* eslint-disable @typescript-eslint/no-unsafe-member-access */
2- /* eslint-disable @typescript-eslint/no-unsafe-return */
3- /* eslint-disable @typescript-eslint/no-unsafe-call */
4- /* eslint-disable @typescript-eslint/no-unsafe-assignment */
5- import { parse as parseConfig } from 'ssh-config' ;
1+ import { parse as parseConfig , Config , ConfigResolver } from 'ssh-config' ;
62
73const SSH_URL_RE = / ^ (?: ( [ ^ @ : ] + ) @ ) ? ( [ ^ : / ] + ) : ? ( .+ ) $ / ;
84const URL_SCHEME_RE = / ^ ( [ a - z - ] + ) : \/ \/ / ;
95
10- /**
11- * SSH Config interface
12- *
13- * Note that this interface atypically capitalizes field names. This is for consistency
14- * with SSH config files.
15- */
16- export interface Config {
17- Host : string ;
18- [ param : string ] : string ;
19- }
20-
21- /**
22- * ConfigResolvers take a config, resolve some additional data (perhaps using
23- * a config file), and return a new Config.
24- */
25- export type ConfigResolver = ( config : Config ) => Config ;
26-
276/**
287 * Parse and resolve an SSH url. Resolves host aliases using the configuration
298 * specified by ~/.ssh/config, if present.
Original file line number Diff line number Diff line change 11/// <reference path='./git.d.ts'/>
22
33declare module 'tunnel' ;
4- declare module 'ssh-config' ;
54
65declare module 'atob' ;
76declare module 'btoa' ;
You can’t perform that action at this time.
0 commit comments