From 7e0c1b9497ff929b160d2b03783fefca2a069fdd Mon Sep 17 00:00:00 2001 From: Scott Hadfield Date: Sun, 29 Mar 2026 09:01:01 -0700 Subject: [PATCH] Remove test script. --- scripts/delete-temp-records.ts | 49 ---------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 scripts/delete-temp-records.ts diff --git a/scripts/delete-temp-records.ts b/scripts/delete-temp-records.ts deleted file mode 100644 index 5e71247..0000000 --- a/scripts/delete-temp-records.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { AtpAgent } from '@atproto/api'; - -const IDENTIFIER = process.argv[2]; -const APP_PASSWORD = process.argv[3]; - -if (!IDENTIFIER || !APP_PASSWORD) { - console.error('Usage: npx tsx scripts/delete-temp-records.ts '); - process.exit(1); -} - -const COLLECTIONS = [ - 'blue.checkmate.game', - 'blue.checkmate.challenge', -]; - -async function main() { - const agent = new AtpAgent({ service: 'https://bsky.social' }); - await agent.login({ identifier: IDENTIFIER, password: APP_PASSWORD }); - console.log(`Logged in as ${agent.session?.did}`); - - for (const collection of COLLECTIONS) { - console.log(`\nListing ${collection}...`); - const res = await agent.com.atproto.repo.listRecords({ - repo: agent.session!.did, - collection, - limit: 100, - }); - - if (res.data.records.length === 0) { - console.log(' No records found.'); - continue; - } - - for (const record of res.data.records) { - const rkey = record.uri.split('/').pop()!; - console.log(` Deleting ${rkey}...`); - await agent.com.atproto.repo.deleteRecord({ - repo: agent.session!.did, - collection, - rkey, - }); - console.log(` Deleted.`); - } - } - - console.log('\nDone. All blue.checkmate.* records deleted.'); -} - -main(); -- 2.51.2