@@ -34,7 +34,7 @@ import { type SymbolReference, parseSymbolReference } from './gridset/symbols';
3434import { isSymbolLibraryReference } from './gridset/resolver' ;
3535import { generateCloneId } from '../utilities/analytics/utils/idGenerator' ;
3636import { translateWithSymbols , extractSymbolsFromButton } from './gridset/symbolAlignment' ;
37- import { ProcessorInput , readBinaryFromInput , decodeText } from '../utils/io' ;
37+ import { ProcessorInput , readBinaryFromInput , decodeText , writeBinaryToPath } from '../utils/io' ;
3838import type JSZip from 'jszip' ;
3939// Use dynamic import for JSZip to support both browser and Node environments
4040type JSZipStatic = typeof JSZip ;
@@ -1794,8 +1794,7 @@ class GridsetProcessor extends BaseProcessor {
17941794 if ( Object . keys ( tree . pages ) . length === 0 ) {
17951795 // Create empty zip for empty tree
17961796 const zipBuffer = await zip . generateAsync ( { type : 'uint8array' } ) ;
1797- // eslint-disable-next-line @typescript-eslint/no-var-requires
1798- require ( 'fs' ) . writeFileSync ( outputPath , zipBuffer ) ;
1797+ writeBinaryToPath ( outputPath , zipBuffer ) ;
17991798 return ;
18001799 }
18011800
@@ -2141,8 +2140,7 @@ class GridsetProcessor extends BaseProcessor {
21412140
21422141 // Write the zip file
21432142 const zipBuffer = await zip . generateAsync ( { type : 'uint8array' } ) ;
2144- // eslint-disable-next-line @typescript-eslint/no-var-requires
2145- require ( 'fs' ) . writeFileSync ( outputPath , zipBuffer ) ;
2143+ writeBinaryToPath ( outputPath , zipBuffer ) ;
21462144 }
21472145
21482146 // Helper method to calculate column definitions based on page layout
0 commit comments