Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 34 lines 1.1 kB view raw
1#!/usr/bin/env node 2// check-handle-structure.mjs - See what handle records actually look like 3 4import { config } from 'dotenv'; 5import { fileURLToPath } from 'url'; 6import { dirname, join } from 'path'; 7import { connect } from '../../../system/backend/database.mjs'; 8 9// Load environment from vault 10const __filename = fileURLToPath(import.meta.url); 11const __dirname = dirname(__filename); 12const vaultEnvPath = join(__dirname, '../../../aesthetic-computer-vault/at/.env'); 13config({ path: vaultEnvPath }); 14 15try { 16 const database = await connect(); 17 const handles = database.db.collection('@handles'); 18 19 console.log('\n🔍 Sampling @handles records:\n'); 20 21 // Get 5 records with handles 22 const samples = await handles.find({ handle: { $exists: true } }).limit(5).toArray(); 23 24 samples.forEach((record, i) => { 25 console.log(`Sample ${i + 1}:`); 26 console.log(JSON.stringify(record, null, 2)); 27 console.log(''); 28 }); 29 30 await database.disconnect(); 31} catch (error) { 32 console.error('❌ Error:', error.message); 33 process.exit(1); 34}