1 | import { JsonMap, Optional } from '@salesforce/ts-types/lib';
|
2 | import { ConfigGroup } from './configGroup';
|
3 | import { ConfigContents, ConfigValue } from './configStore';
|
4 |
|
5 |
|
6 |
|
7 | export declare enum AliasGroup {
|
8 | ORGS = "orgs"
|
9 | }
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 | export declare class Aliases extends ConfigGroup<ConfigGroup.Options> {
|
29 | |
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | constructor(options: ConfigGroup.Options);
|
36 | /**
|
37 | * The aliases state file filename.
|
38 | */
|
39 | static getFileName(): string;
|
40 | /**
|
41 | * Get Aliases specific options.
|
42 | */
|
43 | static getDefaultOptions(): ConfigGroup.Options;
|
44 | /**
|
45 | * Updates a group of aliases in a bulk save and returns the new aliases that were saved.
|
46 | *
|
47 | * ```
|
48 | * const aliases = await Aliases.parseAndUpdate(['foo=bar', 'bar=baz'])
|
49 | * ```
|
50 | *
|
51 | * @param aliasKeyAndValues An array of strings in the format `<alias>=<value>`.
|
52 | * Each element will be saved in the Aliases state file under the group.
|
53 | * @param group The group the alias belongs to. Defaults to ORGS.
|
54 | */
|
55 | static parseAndUpdate(aliasKeyAndValues: string[], group?: AliasGroup): Promise<JsonMap>;
|
56 | /**
|
57 | * Get an alias from a key and group. Shorthand for `Alias.create({}).get(key)`. Returns the promise resolved when the
|
58 | * alias is created.
|
59 | *
|
60 | * @param key The value of the alias to match.
|
61 | * @param group The group the alias belongs to. Defaults to Orgs.
|
62 | */
|
63 | static fetch(key: string, group?: AliasGroup): Promise<Optional<string>>;
|
64 | protected setMethod(contents: ConfigContents, key: string, value?: ConfigValue): void;
|
65 | }
|