@soulbatical/tetra-dev-toolkit 1.8.6 → 1.8.8

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.
@@ -34,17 +34,18 @@ import chalk from 'chalk'
34
34
 
35
35
  // Load tetra-core dynamically (it's a peer/workspace dep)
36
36
  async function loadTetraCore() {
37
- try {
38
- return await import('@soulbatical/tetra-core')
39
- } catch {
40
- // Fallback: try relative path in monorepo
41
- try {
42
- return await import('../../core/dist/index.js')
43
- } catch {
44
- console.error(chalk.red('ERROR: @soulbatical/tetra-core not found. Install it first.'))
45
- process.exit(1)
46
- }
37
+ // Try multiple paths: direct import, monorepo sibling, backend workspace
38
+ const attempts = [
39
+ () => import('@soulbatical/tetra-core'),
40
+ () => import('../../core/dist/index.js'),
41
+ () => import(join(process.cwd(), 'backend', 'node_modules', '@soulbatical', 'tetra-core', 'dist', 'index.js')),
42
+ () => import(join(process.cwd(), 'node_modules', '@soulbatical', 'tetra-core', 'dist', 'index.js')),
43
+ ]
44
+ for (const attempt of attempts) {
45
+ try { return await attempt() } catch { /* next */ }
47
46
  }
47
+ console.error(chalk.red('ERROR: @soulbatical/tetra-core not found. Install it first.'))
48
+ process.exit(1)
48
49
  }
49
50
 
50
51
  function findSupabaseConfig() {
@@ -91,8 +92,9 @@ program
91
92
  process.exit(1)
92
93
  }
93
94
 
94
- if (!key.startsWith('eyJ')) {
95
- console.error(chalk.red('ERROR: Key does not look like a service_role key (should start with eyJ).'))
95
+ // Supabase keys can be JWT (eyJ...) or new format (sb_se..., sbp_...)
96
+ if (key === url || key.length < 20) {
97
+ console.error(chalk.red('ERROR: Key does not look like a valid Supabase service key.'))
96
98
  console.error(chalk.gray('Make sure you are using the SERVICE_ROLE key, not the anon key.'))
97
99
  process.exit(1)
98
100
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soulbatical/tetra-dev-toolkit",
3
- "version": "1.8.6",
3
+ "version": "1.8.8",
4
4
  "publishConfig": {
5
5
  "access": "restricted"
6
6
  },