Initial Version of sitemap.xml spec

This commit is contained in:
2026-03-06 23:34:00 -06:00
parent fec5bfa5c7
commit e9495f65b5
41 changed files with 10665 additions and 35 deletions

21
test-globals.mjs Normal file
View File

@@ -0,0 +1,21 @@
// Test that globals are set up correctly by server.js
// NOTE: Don't import server.js directly as it starts the server
// Instead, we'll verify proxy.js works with the expected globals
// Set up globals like server.js does
import crypto from 'node:crypto';
globalThis.crypto = crypto;
globalThis.config = { google: {}, server: {}, sitemap: {} }; // Mock config
// Now import proxy to verify it uses crypto global
import { generateRequestId } from './src/proxy.js';
const reqId = generateRequestId();
console.log('Generated request ID:', reqId);
if (reqId && reqId.startsWith('req_')) {
console.log('✅ proxy.js can use global crypto successfully!');
} else {
console.log('❌ Failed to generate request ID');
process.exit(1);
}