@rslib/core 0.13.1 → 0.13.3

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.
@@ -0,0 +1,46 @@
1
+ //#region src/utils.d.ts
2
+
3
+ declare const convertPathToPattern: (path: string) => string;
4
+ declare const escapePath: (path: string) => string;
5
+ // #endregion
6
+ // #region isDynamicPattern
7
+ /*
8
+ Has a few minor differences with `fast-glob` for better accuracy:
9
+
10
+ Doesn't necessarily return false on patterns that include `\\`.
11
+
12
+ Returns true if the pattern includes parentheses,
13
+ regardless of them representing one single pattern or not.
14
+
15
+ Returns true for unfinished glob extensions i.e. `(h`, `+(h`.
16
+
17
+ Returns true for unfinished brace expansions as long as they include `,` or `..`.
18
+ */
19
+ declare function isDynamicPattern(pattern: string, options?: {
20
+ caseSensitiveMatch: boolean;
21
+ }): boolean; //#endregion
22
+ //#region src/index.d.ts
23
+
24
+ // #endregion
25
+ // #region log
26
+ interface GlobOptions {
27
+ absolute?: boolean;
28
+ cwd?: string;
29
+ patterns?: string | string[];
30
+ ignore?: string | string[];
31
+ dot?: boolean;
32
+ deep?: number;
33
+ followSymbolicLinks?: boolean;
34
+ caseSensitiveMatch?: boolean;
35
+ expandDirectories?: boolean;
36
+ onlyDirectories?: boolean;
37
+ onlyFiles?: boolean;
38
+ debug?: boolean;
39
+ }
40
+ declare function glob(patterns: string | string[], options?: Omit<GlobOptions, "patterns">): Promise<string[]>;
41
+ declare function glob(options: GlobOptions): Promise<string[]>;
42
+ declare function globSync(patterns: string | string[], options?: Omit<GlobOptions, "patterns">): string[];
43
+ declare function globSync(options: GlobOptions): string[];
44
+
45
+ export { convertPathToPattern, escapePath, glob, globSync, isDynamicPattern };
46
+ export type { GlobOptions };