409e92d6ae
Dependency Compatibility Check / Fresh Install Dependency Check (push) Waiting to run
Build and Publish n8n Docker Image / test-image (push) Blocked by required conditions
Build and Publish n8n Docker Image / build-and-push (push) Waiting to run
Build and Publish n8n Docker Image / create-release (push) Blocked by required conditions
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
Automated Release / Detect Version Change (push) Waiting to run
Automated Release / Generate Release Notes (push) Blocked by required conditions
Automated Release / Create GitHub Release (push) Blocked by required conditions
Automated Release / Package MCPB Bundle (push) Blocked by required conditions
Automated Release / Build and Verify (push) Blocked by required conditions
Automated Release / Publish to NPM (push) Blocked by required conditions
Automated Release / Build and Push Docker Images (push) Blocked by required conditions
Secret Scan / secretlint (push) Waiting to run
Test Suite / test (push) Waiting to run
Test Suite / cjs-runtime (push) Waiting to run
Test Suite / publish-results (push) Blocked by required conditions
Automated Release / Update Documentation (push) Blocked by required conditions
Automated Release / Notify Release Completion (push) Blocked by required conditions
55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
#!/usr/bin/env npx tsx
|
|
/**
|
|
* Test direct workflow insert to Supabase
|
|
*/
|
|
|
|
import { createClient } from '@supabase/supabase-js';
|
|
|
|
const TELEMETRY_BACKEND = {
|
|
URL: 'https://ydyufsohxdfpopqbubwk.supabase.co',
|
|
ANON_KEY: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InlkeXVmc29oeGRmcG9wcWJ1YndrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTg3OTYyMDAsImV4cCI6MjA3NDM3MjIwMH0.xESphg6h5ozaDsm4Vla3QnDJGc6Nc_cpfoqTHRynkCk'
|
|
};
|
|
|
|
async function testWorkflowInsert() {
|
|
const supabase = createClient(TELEMETRY_BACKEND.URL, TELEMETRY_BACKEND.ANON_KEY, {
|
|
auth: {
|
|
persistSession: false,
|
|
autoRefreshToken: false,
|
|
}
|
|
});
|
|
|
|
const testWorkflow = {
|
|
user_id: 'direct-test-' + Date.now(),
|
|
workflow_hash: 'hash-direct-' + Date.now(),
|
|
node_count: 2,
|
|
node_types: ['webhook', 'http'],
|
|
has_trigger: true,
|
|
has_webhook: true,
|
|
complexity: 'simple' as const,
|
|
sanitized_workflow: {
|
|
nodes: [
|
|
{ id: '1', type: 'webhook', parameters: {} },
|
|
{ id: '2', type: 'http', parameters: {} }
|
|
],
|
|
connections: {}
|
|
}
|
|
};
|
|
|
|
console.log('Attempting direct insert to telemetry_workflows...');
|
|
console.log('Data:', JSON.stringify(testWorkflow, null, 2));
|
|
|
|
const { data, error } = await supabase
|
|
.from('telemetry_workflows')
|
|
.insert([testWorkflow]);
|
|
|
|
if (error) {
|
|
console.error('\n❌ Error:', error);
|
|
} else {
|
|
console.log('\n✅ Success! Workflow inserted');
|
|
if (data) {
|
|
console.log('Response:', data);
|
|
}
|
|
}
|
|
}
|
|
|
|
testWorkflowInsert().catch(console.error); |