spine-framework 0.3.43 → 0.3.45

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.
@@ -478,11 +478,14 @@ async function resolveHumanPrincipal(token: string, event: any): Promise<Princip
478
478
  // Load person details
479
479
  const { data: person, error: personError } = await adminDb
480
480
  .from('people')
481
- .select('*, role:role_id(slug, name, is_system, is_protected)')
481
+ .select('*, role:roles!role_id(slug, name, is_system, is_protected)')
482
482
  .eq('id', personId)
483
- .single()
483
+ .maybeSingle()
484
484
 
485
- if (personError || !person) {
485
+ if (personError) {
486
+ throw new Error('Person lookup error: ' + personError.message + ' (id: ' + personId + ')')
487
+ }
488
+ if (!person) {
486
489
  throw new Error('Person not found: ' + personId)
487
490
  }
488
491
 
@@ -137,8 +137,8 @@ BEGIN
137
137
  'Master system account for internal Spine operations',
138
138
  '{}'::jsonb,
139
139
  true,
140
- '{}'::jsonb,
141
- '{}'::jsonb,
140
+ design_schema,
141
+ validation_schema,
142
142
  id
143
143
  FROM public.types WHERE slug = 'account' LIMIT 1
144
144
  ON CONFLICT (slug) DO NOTHING;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spine-framework",
3
- "version": "0.3.43",
3
+ "version": "0.3.45",
4
4
  "description": "Multi-tenant, modular application platform for modern SaaS systems",
5
5
  "type": "module",
6
6
  "bin": {