@aperdomoll90/ledger-ai 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -74,20 +74,27 @@ To create a Supabase project:
74
74
  };
75
75
  writeFileSync(configPath, JSON.stringify(merged, null, 2) + '\n');
76
76
  console.error('Config saved to ~/.ledger/config.json\n');
77
- // Step 4: Verify Supabase connection
77
+ // Step 4: Verify Supabase connection by checking for notes table
78
78
  console.error('Connecting to Supabase...');
79
79
  const supabase = createClient(supabaseUrl, supabaseKey);
80
80
  const { error: connError } = await supabase
81
- .from('schema_migrations')
82
- .select('version')
81
+ .from('notes')
82
+ .select('id')
83
83
  .limit(1);
84
- const isNew = connError?.code === '42P01'; // relation does not exist
85
- if (connError && !isNew) {
84
+ // If notes table doesn't exist, it's a new database
85
+ const isNew = connError !== null;
86
+ if (isNew && !connError.message.includes('notes')) {
87
+ // Connection-level error (bad URL, bad key), not just missing table
86
88
  console.error(`Connection error: ${connError.message}`);
87
89
  console.error('Check your Supabase URL and service role key.');
88
90
  process.exit(1);
89
91
  }
90
- console.error('Connected.\n');
92
+ if (isNew) {
93
+ console.error('Connected (new database).\n');
94
+ }
95
+ else {
96
+ console.error('Connected.\n');
97
+ }
91
98
  // Step 5: Validate OpenAI key
92
99
  console.error('Validating OpenAI key...');
93
100
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aperdomoll90/ledger-ai",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "AI identity and memory system — portable persona, knowledge sync, semantic search across agents and devices",
5
5
  "type": "module",
6
6
  "bin": {