Files
app/scripts/clear-nodes.ts
Albert 4584584c24 fix: Correct OAuth localhost/127.0.0.1 config and fix grapheme counting for Bluesky posts
- Fixed OAuth client configuration to properly use localhost for client_id and 127.0.0.1 for redirect_uris per RFC 8252 and ATproto spec
- Added proper grapheme counting using RichText API instead of character length
- Fixed thread splitting to account for link suffix and thread indicators in grapheme limits
- Added GOOGLE_EMBEDDING_DIMENSIONS env var to all env files
- Added clear-nodes.ts utility script for database management
- Added galaxy node detail page route

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 18:26:39 +00:00

24 lines
575 B
TypeScript

import Surreal from 'surrealdb';
async function clearNodes() {
const db = new Surreal();
try {
await db.connect('ws://localhost:8000/rpc');
await db.signin({ username: 'root', password: 'root' });
await db.use({ namespace: 'ponderants', database: 'main' });
console.log('Deleting all nodes...');
const result = await db.query('DELETE node;');
console.log('Result:', result);
console.log('✓ All nodes deleted successfully');
} catch (error) {
console.error('Error:', error);
} finally {
await db.close();
}
}
clearNodes();