@types/file-entry-cache 5.0.3 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,3 @@
1
- # Installation
2
- > `npm install --save @types/file-entry-cache`
3
-
4
- # Summary
5
- This package contains type definitions for file-entry-cache (https://github.com/royriojas/file-entry-cache#readme).
6
-
7
- # Details
8
- Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/file-entry-cache.
9
-
10
- ### Additional Details
11
- * Last updated: Wed, 18 Oct 2023 01:17:34 GMT
12
- * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
13
-
14
- # Credits
15
- These definitions were written by [Piotr Błażejewicz](https://github.com/peterblazejewicz).
1
+ This is a stub types definition for @types/file-entry-cache (https://github.com/jaredwray/cacheable#readme).
2
+
3
+ file-entry-cache provides its own type definitions, so you don't need @types/file-entry-cache installed!
@@ -1,27 +1,12 @@
1
1
  {
2
2
  "name": "@types/file-entry-cache",
3
- "version": "5.0.3",
4
- "description": "TypeScript definitions for file-entry-cache",
5
- "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/file-entry-cache",
6
- "license": "MIT",
7
- "contributors": [
8
- {
9
- "name": "Piotr Błażejewicz",
10
- "githubUsername": "peterblazejewicz",
11
- "url": "https://github.com/peterblazejewicz"
12
- }
13
- ],
3
+ "version": "10.0.0",
4
+ "description": "Stub TypeScript definitions entry for file-entry-cache, which provides its own types definitions",
14
5
  "main": "",
15
- "types": "index.d.ts",
16
- "repository": {
17
- "type": "git",
18
- "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
19
- "directory": "types/file-entry-cache"
20
- },
21
6
  "scripts": {},
7
+ "license": "MIT",
22
8
  "dependencies": {
23
- "@types/node": "*"
9
+ "file-entry-cache": "*"
24
10
  },
25
- "typesPublisherContentHash": "cc490c6c11597c61699fd1446621e94c0e802abaaca3135d58d3405555b21038",
26
- "typeScriptVersion": "4.5"
11
+ "deprecated": "This is a stub types definition. file-entry-cache provides its own type definitions, so you do not need this installed."
27
12
  }
@@ -1,78 +0,0 @@
1
- /// <reference types="node" />
2
-
3
- /**
4
- * @param pathToCache - the path to the cache file (this combines the cache name and directory
5
- * @param useCheckSum - Whether to use md5 checksum to verify if file changed.
6
- * If false the default will be to use the mtime and size of the file
7
- */
8
- export function createFromFile(pathToCache: string, useCheckSum?: boolean): FileEntryCache;
9
-
10
- /**
11
- * @param cacheName - the name of the cache to be created
12
- * @param directory - the directory to load the cache from
13
- * @param usecheckSum - Whether to use md5 checksum to verify if file changed.
14
- * If false the default will be to use the mtime and size of the file
15
- */
16
- export function create(cacheName: string, directory?: string, usecheckSum?: boolean): FileEntryCache;
17
-
18
- export interface FileEntryCache {
19
- /** the flat cache storage used to persist the metadata of the `files */
20
- cache: object;
21
- /** Given a buffer, calculate md5 hash of its content. */
22
- getHash(buffer: Buffer): string;
23
- /** Return whether or not a file has changed since last time reconcile was called */
24
- hasFileChanged(file: string): boolean;
25
- /**
26
- * given an array of file paths it return and object with three arrays:
27
- * - changedFiles: Files that changed since previous run
28
- * - notChangedFiles: Files that haven't change
29
- * - notFoundFiles: Files that were not found, probably deleted
30
- */
31
- analyzeFiles(files?: string[]): AnalyzedFilesInfo;
32
- getFileDescriptor(file: string): FileDescriptor;
33
- /**
34
- * Return the list o the files that changed compared
35
- * against the ones stored in the cache
36
- */
37
- getUpdatedFiles(files?: string[]): string[];
38
- /**
39
- * return the list of file
40
- */
41
- normalizeEntries(files?: string[]): FileDescriptor[];
42
- /**
43
- * Remove an entry from the file-entry-cache.
44
- * Useful to force the file to still be considered
45
- * modified the next time the process is run
46
- */
47
- removeEntry(entryName: string): void;
48
- /**
49
- * Delete the cache file from the disk
50
- */
51
- deleteCacheFile(): void;
52
- /**
53
- * remove the cache from the file and clear the memory cache
54
- */
55
- destroy(): void;
56
- /**
57
- * Sync the files and persist them to the cache
58
- */
59
- reconcile(noPrune?: boolean): void;
60
- }
61
-
62
- export interface AnalyzedFilesInfo {
63
- readonly changedFiles: string[];
64
- readonly notFoundFiles: string[];
65
- readonly notChangedFiles: string[];
66
- }
67
-
68
- export interface FileDescriptor {
69
- readonly key: string;
70
- readonly notFound: boolean;
71
- readonly err?: Error | undefined;
72
- readonly changed?: boolean | undefined;
73
- readonly meta?: {
74
- readonly size?: number | undefined;
75
- readonly mtime?: number | undefined;
76
- readonly hash?: string | undefined;
77
- } | undefined;
78
- }