openagenticresearch / test_app.py
Leon4gr45's picture
Upload folder using huggingface_hub
fa66670 verified
with open("server/src/routes/health.ts", "r") as f:
health_content = f.read()
health_content = 'import "../types/express.d.ts";\n' + health_content
with open("server/src/routes/health.ts", "w") as f:
f.write(health_content)
import glob
import os
for root, dirs, files in os.walk("server/src/routes/"):
for file in files:
if file.endswith(".ts"):
file_path = os.path.join(root, file)
with open(file_path, "r") as f:
content = f.read()
if 'import "../types/express.d.ts";\n' not in content:
with open(file_path, "w") as f:
f.write('import "../types/express.d.ts";\n' + content)