@@ -153,23 +153,25 @@ async function validateDistStructure() {
153153 }
154154
155155 // Required files in dist.
156- const requiredFiles = [ 'cli.js' , 'package.json' ]
156+ const requiredFiles = [ 'index.js' , ' cli.js.bz ', 'package.json' ]
157157 for ( const file of requiredFiles ) {
158158 const filePath = path . join ( distPath , file )
159159 if ( ! ( await fileExists ( filePath ) ) ) {
160160 errors . push ( `Required file missing: dist/${ file } ` )
161161 }
162162 }
163163
164- // Check CLI file size (sanity check).
165- const cliPath = path . join ( distPath , 'cli.js' )
166- if ( await fileExists ( cliPath ) ) {
167- const stats = await fs . stat ( cliPath )
164+ // Check CLI bundle size (sanity check).
165+ const cliBzPath = path . join ( distPath , 'cli.js.bz ' )
166+ if ( await fileExists ( cliBzPath ) ) {
167+ const stats = await fs . stat ( cliBzPath )
168168 const sizeMB = stats . size / 1_024 / 1_024
169169
170- if ( sizeMB < 5 ) {
171- warnings . push ( `CLI bundle is suspiciously small: ${ sizeMB . toFixed ( 2 ) } MB` )
172- } else if ( sizeMB > 20 ) {
170+ if ( sizeMB < 1 ) {
171+ warnings . push (
172+ `CLI bundle is suspiciously small: ${ sizeMB . toFixed ( 2 ) } MB` ,
173+ )
174+ } else if ( sizeMB > 3 ) {
173175 warnings . push (
174176 `CLI bundle is larger than expected: ${ sizeMB . toFixed ( 2 ) } MB` ,
175177 )
0 commit comments