pdf upload checkpoint1

This commit is contained in:
2025-06-13 22:59:53 +05:30
parent dd814b902d
commit 56ef5ab65d
9 changed files with 226 additions and 16 deletions

View File

@@ -0,0 +1,15 @@
import fs from 'fs';
import path from 'path';
const dir = path.resolve(__dirname, '../shared/schemas/objects');
fs.readdirSync(dir).forEach(file => {
if (!file.endsWith('.schema.ts')) return;
const full = path.join(dir, file);
let content = fs.readFileSync(full, 'utf8');
if (content.includes('z.instanceof(Buffer)') && !content.includes("import { Buffer")) {
content = `import { Buffer } from 'buffer';\n` + content;
fs.writeFileSync(full, content);
console.log('Patched:', file);
}
});