QR-master/scripts/debug-hang.ts

33 lines
952 B
TypeScript

console.log('1. Starting debug script...');
try {
console.log('2. Importing fs...');
const fs = require('fs');
console.log(' fs imported.');
console.log('3. Importing path...');
const path = require('path');
console.log(' path imported.');
console.log('4. Importing googleapis...');
const { google } = require('googleapis');
console.log(' googleapis imported.');
console.log('5. Importing ../src/lib/indexnow...');
const indexnow = require('../src/lib/indexnow');
console.log(' indexnow imported.');
console.log(' Keys:', Object.keys(indexnow));
if (indexnow.getAllIndexableUrls) {
console.log('6. Calling getAllIndexableUrls...');
const urls = indexnow.getAllIndexableUrls();
console.log(` Got ${urls.length} URLs.`);
}
console.log('7. Done!');
} catch (err) {
console.error('ERROR during import:', err);
}