Update what is being audit logged (#11833)
No need to audit log workflow runs as it's already a form of audit log. Add more audit log for other objects Rename MessagingTelemetry to MessagingMonitoring Merge Analytics and Audit in one (Audit) --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
@ -0,0 +1,38 @@
|
||||
/* eslint-disable no-console */
|
||||
import { createClient } from '@clickhouse/client';
|
||||
import { config } from 'dotenv';
|
||||
|
||||
import { fixtures } from './fixtures';
|
||||
|
||||
config({
|
||||
path: process.env.NODE_ENV === 'test' ? '.env.test' : '.env',
|
||||
override: true,
|
||||
});
|
||||
|
||||
const client = createClient({
|
||||
url: process.env.CLICKHOUSE_URL,
|
||||
});
|
||||
|
||||
async function seedEvents() {
|
||||
try {
|
||||
console.log(`⚡ Seeding ${fixtures.length} events...`);
|
||||
|
||||
await client.insert({
|
||||
table: 'auditEvent',
|
||||
values: fixtures,
|
||||
format: 'JSONEachRow',
|
||||
});
|
||||
|
||||
console.log('✅ All events seeded successfully');
|
||||
} catch (error) {
|
||||
console.error('Error seeding events:', error);
|
||||
throw error;
|
||||
} finally {
|
||||
await client.close();
|
||||
}
|
||||
}
|
||||
|
||||
seedEvents().catch((err) => {
|
||||
console.error('Seeding error:', err);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user