@atomist/sdm-core
Version:
Atomist Software Delivery Machine - Implementation
24 lines • 1.13 kB
TypeScript
import { HandlerContext } from "@atomist/automation-client";
import { PreferenceStoreFactory } from "@atomist/sdm";
import { AbstractPreferenceStore, Preference } from "./AbstractPreferenceStore";
/**
* Factory to create a new FilePreferenceStore instance
*/
export declare const FilePreferenceStoreFactory: PreferenceStoreFactory;
/**
* PreferenceStore implementation that stores preferences in a shared file.
* Note: this implementation attempts to lock the preference file before reading or writing to it
* but it is not intended for production usage.
*/
export declare class FilePreferenceStore extends AbstractPreferenceStore {
private readonly filePath;
constructor(context: HandlerContext, filePath?: string);
protected doGet(name: string, namespace: string): Promise<Preference | undefined>;
protected doPut(pref: Preference): Promise<void>;
protected doList(namespace: string): Promise<Preference[]>;
protected doDelete(pref: string, namespace: string): Promise<void>;
private read;
private doWithPreferenceFile;
private init;
}
//# sourceMappingURL=FilePreferenceStore.d.ts.map