UNPKG

1.02 kBTypeScriptView Raw
1import { AsyncOptionalCreatable } from '@salesforce/kit';
2import { AliasAccessor } from './accessors/aliasAccessor';
3import { OrgAccessor } from './accessors/orgAccessor';
4import { SandboxAccessor } from './accessors/sandboxAccessor';
5import { TokenAccessor } from './accessors/tokenAccessor';
6export declare class StateAggregator extends AsyncOptionalCreatable {
7 private static instanceMap;
8 aliases: AliasAccessor;
9 orgs: OrgAccessor;
10 sandboxes: SandboxAccessor;
11 tokens: TokenAccessor;
12 /**
13 * Reuse a StateAggregator if one was already created for the current global state directory
14 * Otherwise, create one and adds it to map for future reuse.
15 * HomeDir might be stubbed in tests
16 */
17 static getInstance(): Promise<StateAggregator>;
18 /**
19 * Clear the cache to force reading from disk.
20 *
21 * *NOTE: Only call this method if you must and you know what you are doing.*
22 */
23 static clearInstance(path?: string): void;
24 protected init(): Promise<void>;
25}