File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -209,9 +209,16 @@ async function getModuleInstallFiles(name, visited = new Set()) {
209209async function validateRegistry ( ) {
210210 const registry = await readJson ( path . join ( repoRoot , "registry.json" ) ) ;
211211 const itemNames = new Set ( ) ;
212- const moduleDirs = ( await readdir ( modulesRoot ) ) . map ( ( name ) => path . join ( modulesRoot , name ) ) ;
212+ const moduleDirs = [ ] ;
213213 const errors = [ ] ;
214214
215+ for ( const name of await readdir ( modulesRoot ) ) {
216+ const fullPath = path . join ( modulesRoot , name ) ;
217+ if ( ( await stat ( fullPath ) ) . isDirectory ( ) ) {
218+ moduleDirs . push ( fullPath ) ;
219+ }
220+ }
221+
215222 for ( const item of registry . items ?? [ ] ) {
216223 if ( itemNames . has ( item . name ) ) errors . push ( `registry.json: duplicate item ${ item . name } ` ) ;
217224 itemNames . add ( item . name ) ;
@@ -272,7 +279,12 @@ async function validateRegistry() {
272279}
273280
274281async function listModules ( ) {
275- const names = await readdir ( modulesRoot ) ;
282+ const names = [ ] ;
283+ for ( const name of await readdir ( modulesRoot ) ) {
284+ if ( ( await stat ( path . join ( modulesRoot , name ) ) ) . isDirectory ( ) ) {
285+ names . push ( name ) ;
286+ }
287+ }
276288 for ( const name of names . sort ( ) ) {
277289 const { manifest } = await getModule ( name ) ;
278290 console . log ( `${ manifest . name . padEnd ( 18 ) } ${ manifest . status . padEnd ( 12 ) } ${ manifest . description } ` ) ;
You can’t perform that action at this time.
0 commit comments