-
-
Notifications
You must be signed in to change notification settings - Fork 197
/
Copy pathfiles-hash-service.d.ts
35 lines (34 loc) · 1.23 KB
/
files-hash-service.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { IPlatformData } from "./platform";
import { IStringDictionary } from "../common/declarations";
interface IFilesHashService {
generateHashes(files: string[]): Promise<IStringDictionary>;
/**
* Generate hashes for all prepared files (all files from app folder under platforms folder).
* @param platformData - Current platform's data
* @returns {Promise<IStringDictionary>}
* A map with key file's path and value - file's hash
*/
generateHashesForProject(
platformData: IPlatformData
): Promise<IStringDictionary>;
/**
* Generates hashes for all prepared files (all files from app folder under platforms folder)
* and saves them in .nshashes file under `hashFileDirectory` directory.
* @param platformData - Current platform's data
* @param hashesFileDirectory - Path to directory containing the hash file.
* @returns {Promise<void>}
*/
saveHashesForProject(
platformData: IPlatformData,
hashesFileDirectory: string
): Promise<IStringDictionary>;
saveHashes(hashes: IStringDictionary, hashesFileDirectory: string): void;
getChanges(
files: string[],
oldHashes: IStringDictionary
): Promise<IStringDictionary>;
hasChangesInShasums(
oldHashes: IStringDictionary,
newHashes: IStringDictionary
): boolean;
}