( packFiles: NewPackedFile[], path: string, existingPackToAppend?: Pack, replaceDuplicates?: boolean, dependencyPacks: string[] = [], )
| 1970 | } |
| 1971 | }; |
| 1972 | export const writePack = async ( |
| 1973 | packFiles: NewPackedFile[], |
| 1974 | path: string, |
| 1975 | existingPackToAppend?: Pack, |
| 1976 | replaceDuplicates?: boolean, |
| 1977 | dependencyPacks: string[] = [], |
| 1978 | ) => { |
| 1979 | // Use fast append implementation when we have an existing pack |
| 1980 | if (existingPackToAppend) { |
| 1981 | return await writePackAppendFast( |
| 1982 | packFiles, |
| 1983 | path, |
| 1984 | existingPackToAppend, |
| 1985 | replaceDuplicates, |
| 1986 | dependencyPacks, |
| 1987 | ); |
| 1988 | } |
| 1989 | // Fallback to sorted implementation for new packs |
| 1990 | return await writePackSorted(packFiles, path, dependencyPacks); |
| 1991 | }; |
| 1992 | // Legacy implementation (kept for reference, but replaced by the optimized versions above) |
| 1993 | export const writePackLegacy = async ( |
| 1994 | packFiles: NewPackedFile[], |
no test coverage detected