allFilesReady()
Resolves when all existing files in the file writer queue have been written to disk.Return Value
Resolves when all files in the current queue are written to disk. Does not reject on write errors.
Behavior
- Waits for the build to complete (
build_endevent) - Monitors all files in the output files map
- Resolves when all file write promises settle (both fulfilled and rejected)
- Useful for ensuring files are ready before performing operations that depend on them
Usage Notes
- This function is only relevant during development mode
- It waits for files that already exist in the queue, not files added afterwards
- Write errors do not cause this promise to reject
fileReady()
Resolves when a specific file and all its dependencies have been written to disk.Parameters
Return Value
Resolves when the file and all its dependencies are written. Rejects if the file is not found in the output files map.
Behavior
- Looks up the file in the output files map by its generated filename
- Waits for the file’s write operation to complete
- Recursively waits for all dependencies to be written
- Throws an error if the file is not found in the output map
Usage Notes
- The file must have been added to the file writer before calling this function
- Dependencies are tracked automatically and waited for recursively
- Useful when you need to ensure a specific file is ready before proceeding