chore: scripts Dokploy/BPS (cron secret, Ads MCC, sync y probes)

Incluye utilidades de ops para CRON_SECRET, login customer Google Ads, sync de seguimiento BPS y probes de conexiones.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
4Ventures
2026-09-29 16:48:44 +02:00
parent 8c5acb626f
commit 1a58af129d
17 changed files with 2913 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
import { config } from 'dotenv';
import { resolve } from 'path';
config({ path: resolve(process.cwd(), '.env.local') });
import {
listDocs,
bestDocForTenant,
cleanClientDocName,
} from '../src/lib/superhuman-docs';
import { scoreNameToTenant } from '../src/lib/match';
import { findSeguimientoGoogleDoc } from '../src/lib/superhuman-docs';
async function main() {
const docs = await listDocs();
console.log('docs', docs.length);
for (const d of docs) {
const clean = cleanClientDocName(d.name);
const s1 = scoreNameToTenant(clean, 'BPS', 'bps');
const s2 = scoreNameToTenant(clean, 'Blue Parrot School', 'blue-parrot');
if (
s1 >= 15 ||
s2 >= 15 ||
/parrot|bps|blue/i.test(d.name)
) {
console.log({ name: d.name, clean, s1, s2, id: d.id });
}
}
console.log(
'best BPS',
bestDocForTenant({ name: 'BPS', slug: 'bps' }, docs)
);
console.log(
'best Blue Parrot School',
bestDocForTenant(
{ name: 'Blue Parrot School', slug: 'blue-parrot-school' },
docs
)
);
const drive = await findSeguimientoGoogleDoc([
'Seguimiento Semanal BPS',
'Seguimiento Semanal Blue Parrot School',
'Seguimiento Semanal Blue Parrot',
'BPS',
'Blue Parrot School',
]);
console.log('drive hit', drive);
}
main().catch((e) => {
console.error(e);
process.exit(1);
});