| 1 | // Alchemy modifications are licensed under Apache-2.0. |
| 2 | // This file includes third-party code; see /THIRD_PARTY_LICENSES.md. |
| 3 | import * as Effect from "effect/Effect"; |
| 4 | import * as FileSystem from "effect/FileSystem"; |
| 5 | import * as Path from "effect/Path"; |
| 6 | import type { PlatformError } from "effect/PlatformError"; |
| 7 | /** normalises sep for windows and prefix with `/` */ |
| 8 | export declare const normalizeFilePath: (relativeFilepath: string) => string; |
| 9 | export declare const getContentType: (absFilePath: string) => string | null; |
| 10 | /** |
| 11 | * Generate a function that can match relative filepaths against a list of gitignore formatted patterns. |
| 12 | */ |
| 13 | export declare function createPatternMatcher( |
| 14 | patterns: Array<string>, |
| 15 | exclude: boolean, |
| 16 | ): (filePath: string) => boolean; |
| 17 | /** |
| 18 | * Create a function for filtering out ignored assets. |
| 19 | * |
| 20 | * The generated function takes an asset path, relative to the asset directory, |
| 21 | * and returns true if the asset should not be ignored. |
| 22 | */ |
| 23 | export declare const createAssetsIgnoreFunction: (dir: string) => Effect.Effect< |
| 24 | { |
| 25 | assetsIgnoreFunction: (filePath: string) => boolean; |
| 26 | assetsIgnoreFilePresent: boolean; |
| 27 | }, |
| 28 | PlatformError, |
| 29 | FileSystem.FileSystem | Path.Path |
| 30 | >; |
| 31 | //# sourceMappingURL=helpers.d.ts.map |