1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import type { Stats } from 'graceful-fs';
|
9 | import type { Config } from '@jest/types';
|
10 | import type ModuleMap from './ModuleMap';
|
11 | import type HasteFS from './HasteFS';
|
12 | export declare type IgnoreMatcher = (item: string) => boolean;
|
13 | export declare type WorkerMessage = {
|
14 | computeDependencies: boolean;
|
15 | computeSha1: boolean;
|
16 | dependencyExtractor?: string | null;
|
17 | rootDir: string;
|
18 | filePath: string;
|
19 | hasteImplModulePath?: string;
|
20 | };
|
21 | export declare type WorkerMetadata = {
|
22 | dependencies: Array<string> | undefined | null;
|
23 | id: string | undefined | null;
|
24 | module: ModuleMetaData | undefined | null;
|
25 | sha1: string | undefined | null;
|
26 | };
|
27 | export declare type CrawlerOptions = {
|
28 | computeSha1: boolean;
|
29 | data: InternalHasteMap;
|
30 | extensions: Array<string>;
|
31 | forceNodeFilesystemAPI: boolean;
|
32 | ignore: IgnoreMatcher;
|
33 | rootDir: string;
|
34 | roots: Array<string>;
|
35 | };
|
36 | export declare type HasteImpl = {
|
37 | getHasteName(filePath: Config.Path): string | undefined;
|
38 | };
|
39 | export declare type FileData = Map<Config.Path, FileMetaData>;
|
40 | export declare type FileMetaData = [
|
41 | string,
|
42 | number,
|
43 | number,
|
44 | 0 | 1,
|
45 | string,
|
46 | string | null | undefined
|
47 | ];
|
48 | export declare type MockData = Map<string, Config.Path>;
|
49 | export declare type ModuleMapData = Map<string, ModuleMapItem>;
|
50 | export declare type WatchmanClocks = Map<Config.Path, string>;
|
51 | export declare type HasteRegExp = RegExp | ((str: string) => boolean);
|
52 | export declare type DuplicatesSet = Map<string, /* type */ number>;
|
53 | export declare type DuplicatesIndex = Map<string, Map<string, DuplicatesSet>>;
|
54 | export declare type InternalHasteMap = {
|
55 | clocks: WatchmanClocks;
|
56 | duplicates: DuplicatesIndex;
|
57 | files: FileData;
|
58 | map: ModuleMapData;
|
59 | mocks: MockData;
|
60 | };
|
61 | export declare type HasteMap = {
|
62 | hasteFS: HasteFS;
|
63 | moduleMap: ModuleMap;
|
64 | __hasteMapForTest?: InternalHasteMap | null;
|
65 | };
|
66 | export declare type RawModuleMap = {
|
67 | rootDir: Config.Path;
|
68 | duplicates: DuplicatesIndex;
|
69 | map: ModuleMapData;
|
70 | mocks: MockData;
|
71 | };
|
72 | declare type ModuleMapItem = {
|
73 | [platform: string]: ModuleMetaData;
|
74 | };
|
75 | export declare type ModuleMetaData = [Config.Path, /* type */ number];
|
76 | export declare type HType = {
|
77 | ID: 0;
|
78 | MTIME: 1;
|
79 | SIZE: 2;
|
80 | VISITED: 3;
|
81 | DEPENDENCIES: 4;
|
82 | SHA1: 5;
|
83 | PATH: 0;
|
84 | TYPE: 1;
|
85 | MODULE: 0;
|
86 | PACKAGE: 1;
|
87 | GENERIC_PLATFORM: 'g';
|
88 | NATIVE_PLATFORM: 'native';
|
89 | DEPENDENCY_DELIM: '\0';
|
90 | };
|
91 | export declare type HTypeValue = HType[keyof HType];
|
92 | export declare type EventsQueue = Array<{
|
93 | filePath: Config.Path;
|
94 | stat: Stats | undefined;
|
95 | type: string;
|
96 | }>;
|
97 | export declare type ChangeEvent = {
|
98 | eventsQueue: EventsQueue;
|
99 | hasteFS: HasteFS;
|
100 | moduleMap: ModuleMap;
|
101 | };
|
102 | export {};
|
103 |
|
\ | No newline at end of file |