spine-framework 0.3.68 → 0.3.69

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.
@@ -248,6 +248,8 @@ async function seedApp(appDir: string, appSlug: string) {
248
248
  is_active: true,
249
249
  route_prefix: manifest.route_prefix ?? ('/' + appSlug),
250
250
  renderer: manifest.renderer ?? 'custom',
251
+ // min_role: first entry of required_roles array, or explicit min_role field
252
+ min_role: manifest.required_roles?.[0] ?? manifest.min_role ?? null,
251
253
  },
252
254
  { onConflict: 'slug' }
253
255
  )
@@ -300,10 +300,12 @@ export function RegisterPage() {
300
300
  }
301
301
 
302
302
  // Handle account creation vs existing account assignment
303
+ // IMPORTANT: use effectiveAccountStrategy (local var), NOT accountStrategy (React state)
304
+ // React state updates are async — accountStrategy may still hold the previous value here
303
305
  let registrationResult
304
- console.log('Registration decision:', { accountStrategy, targetAccount, effectiveRole })
306
+ console.log('Registration decision:', { effectiveAccountStrategy, targetAccount, effectiveRole })
305
307
 
306
- if (accountStrategy === 'existing' && targetAccount) {
308
+ if (effectiveAccountStrategy === 'existing' && targetAccount) {
307
309
  // Assign to existing account
308
310
  console.log('Using existing_account path')
309
311
  registrationResult = await callInvitesApi('complete-registration', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spine-framework",
3
- "version": "0.3.68",
3
+ "version": "0.3.69",
4
4
  "description": "Multi-tenant, modular application platform for modern SaaS systems",
5
5
  "type": "module",
6
6
  "bin": {