You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Validate user directories when generating player.d.ts (#232)
* Validate user directories when generating `player.d.ts`
* Actually call `isDirectory`
Co-authored-by: Samual Norman <me@samual.uk>
---------
Co-authored-by: Samual Norman <me@samual.uk>
Copy file name to clipboardExpand all lines: src/generateTypeDeclaration.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ export async function generateTypeDeclaration(sourceDirectory: string, hackmudPa
17
17
constallScripts: Record<string,string[]>={}
18
18
constallAnyScripts: Record<string,string[]>={}
19
19
20
-
awaitPromise.all((awaitreadDirectoryWithStats(sourceDirectory)).map(async({ stats, name })=>{
20
+
awaitPromise.all((awaitreadDirectoryWithStats(sourceDirectory)).filter(({stats, name})=>!stats.isDirectory()||/^[a-z_][a-z\d_]{0,24}$/.test(name)).map(async({ stats, name })=>{
0 commit comments