UNPKG

1.01 kBTypeScriptView Raw
1export declare function parse(body: string): Machines;
2export declare class Netrc {
3 file: string;
4 machines: Machines;
5 constructor(file?: string);
6 load(): Promise<undefined>;
7 loadSync(): undefined;
8 save(): Promise<{}>;
9 saveSync(): void;
10 private readonly output;
11 private readonly defaultFile;
12 private readonly gpgDecryptArgs;
13 private readonly gpgEncryptArgs;
14 private throw;
15}
16declare const _default: Netrc;
17export default _default;
18export declare type Token = MachineToken | {
19 type: 'other';
20 content: string;
21};
22export declare type MachineToken = {
23 type: 'machine';
24 pre?: string;
25 host: string;
26 internalWhitespace: string;
27 props: {
28 [key: string]: {
29 value: string;
30 comment?: string;
31 };
32 };
33 comment?: string;
34};
35export declare type Machines = {
36 [key: string]: {
37 login?: string;
38 password?: string;
39 account?: string;
40 [key: string]: string | undefined;
41 };
42};