@@ -4,16 +4,16 @@ import * as JsonSchemaStaticDocsLib from "json-schema-static-docs"; // Use names
44import fs from "fs/promises" ;
55import path from "path" ;
66import os from "os" ;
7- import { createRequire } from "module " ; // Import createRequire
7+ // import { DocGenerator } from "json-schema-static-docs "; // Removed
88
99// Helper to resolve package paths
10- const require = createRequire ( import . meta. url ) ;
10+ // const require = createRequire(import.meta.url);
1111
1212// Recursive copy function (fs.cp might not be available everywhere or handle nested dirs reliably)
1313async function copyDirRecursive ( src : string , dest : string ) {
1414 await fs . mkdir ( dest , { recursive : true } ) ;
1515 const entries = await fs . readdir ( src , { withFileTypes : true } ) ;
16- for ( let entry of entries ) {
16+ for ( const entry of entries ) {
1717 const srcPath = path . join ( src , entry . name ) ;
1818 const destPath = path . join ( dest , entry . name ) ;
1919 if ( entry . isDirectory ( ) ) {
@@ -25,7 +25,7 @@ async function copyDirRecursive(src: string, dest: string) {
2525}
2626
2727// Helper to create a temporary file
28- async function writeTempSchemaFile ( schema : any ) : Promise < string > {
28+ async function writeTempSchemaFile ( schema : Record < string , unknown > ) : Promise < string > {
2929 const tempDir = await fs . mkdtemp ( path . join ( os . tmpdir ( ) , "schema-" ) ) ;
3030 const tempFilePath = path . join ( tempDir , "schema.json" ) ;
3131 await fs . writeFile ( tempFilePath , JSON . stringify ( schema , null , 2 ) ) ;
0 commit comments