409e92d6ae
Build and Push Docker Images / Build Docker Image (push) Has been cancelled
Build and Push Docker Images / Build Railway Docker Image (push) Has been cancelled
Build and Publish n8n Docker Image / test-image (push) Has been cancelled
Dependency Compatibility Check / Fresh Install Dependency Check (push) Has been cancelled
Build and Publish n8n Docker Image / build-and-push (push) Has been cancelled
Build and Publish n8n Docker Image / create-release (push) Has been cancelled
Automated Release / Detect Version Change (push) Has been cancelled
Automated Release / Generate Release Notes (push) Has been cancelled
Automated Release / Create GitHub Release (push) Has been cancelled
Automated Release / Package MCPB Bundle (push) Has been cancelled
Automated Release / Build and Verify (push) Has been cancelled
Automated Release / Publish to NPM (push) Has been cancelled
Automated Release / Build and Push Docker Images (push) Has been cancelled
Automated Release / Update Documentation (push) Has been cancelled
Automated Release / Notify Release Completion (push) Has been cancelled
Secret Scan / secretlint (push) Has been cancelled
Test Suite / test (push) Has been cancelled
Test Suite / cjs-runtime (push) Has been cancelled
Test Suite / publish-results (push) Has been cancelled
68 lines
1.7 KiB
TypeScript
68 lines
1.7 KiB
TypeScript
#!/usr/bin/env npx tsx
|
|
/**
|
|
* Test telemetry without requesting data back
|
|
*/
|
|
|
|
import { createClient } from '@supabase/supabase-js';
|
|
import dotenv from 'dotenv';
|
|
|
|
dotenv.config();
|
|
|
|
async function testNoSelect() {
|
|
const supabaseUrl = process.env.SUPABASE_URL!;
|
|
const supabaseAnonKey = process.env.SUPABASE_ANON_KEY!;
|
|
|
|
console.log('🧪 Telemetry Test (No Select)\n');
|
|
|
|
const supabase = createClient(supabaseUrl, supabaseAnonKey, {
|
|
auth: {
|
|
persistSession: false,
|
|
autoRefreshToken: false,
|
|
}
|
|
});
|
|
|
|
// Insert WITHOUT .select() - just fire and forget
|
|
const testData = {
|
|
user_id: 'test-' + Date.now(),
|
|
event: 'test_event',
|
|
properties: { test: true }
|
|
};
|
|
|
|
console.log('Inserting:', testData);
|
|
|
|
const { error } = await supabase
|
|
.from('telemetry_events')
|
|
.insert([testData]); // No .select() here!
|
|
|
|
if (error) {
|
|
console.error('❌ Failed:', error);
|
|
} else {
|
|
console.log('✅ Success! Data inserted (no response data)');
|
|
}
|
|
|
|
// Test workflow insert too
|
|
const testWorkflow = {
|
|
user_id: 'test-' + Date.now(),
|
|
workflow_hash: 'hash-' + Date.now(),
|
|
node_count: 3,
|
|
node_types: ['webhook', 'http', 'slack'],
|
|
has_trigger: true,
|
|
has_webhook: true,
|
|
complexity: 'simple',
|
|
sanitized_workflow: { nodes: [], connections: {} }
|
|
};
|
|
|
|
console.log('\nInserting workflow:', testWorkflow);
|
|
|
|
const { error: workflowError } = await supabase
|
|
.from('telemetry_workflows')
|
|
.insert([testWorkflow]); // No .select() here!
|
|
|
|
if (workflowError) {
|
|
console.error('❌ Workflow failed:', workflowError);
|
|
} else {
|
|
console.log('✅ Workflow inserted successfully!');
|
|
}
|
|
}
|
|
|
|
testNoSelect().catch(console.error); |