spine-framework 0.3.134 → 0.3.135

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.
@@ -137,7 +137,7 @@ function isAdminRole(roleSlug: string | undefined): boolean {
137
137
  // CIL[DOC-VECTOR type="constraint" content="No test paths identified."]
138
138
  // CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
139
139
  // CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
140
- export const checkFirstUser = createHandler(async (_ctx, _body) => {
140
+ export const checkFirstUser = createPublicHandler(async (_ctx, _body) => {
141
141
  const { count, error } = await adminDb
142
142
  .from('people')
143
143
  .select('*', { count: 'exact', head: true })
@@ -161,7 +161,7 @@ export const checkFirstUser = createHandler(async (_ctx, _body) => {
161
161
  // CIL[DOC-VECTOR type="constraint" content="No test paths identified."]
162
162
  // CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
163
163
  // CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
164
- export const checkDomain = createHandler(async (_ctx, _body) => {
164
+ export const checkDomain = createPublicHandler(async (_ctx, _body) => {
165
165
  const email = _ctx.query?.email as string | undefined
166
166
  if (!email || !email.includes('@')) {
167
167
  throw new Error('Valid email is required')
@@ -198,7 +198,7 @@ export const checkDomain = createHandler(async (_ctx, _body) => {
198
198
  // CIL[DOC-VECTOR type="constraint" content="No test paths identified."]
199
199
  // CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
200
200
  // CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
201
- export const validateToken = createHandler(async (_ctx, _body) => {
201
+ export const validateToken = createPublicHandler(async (_ctx, _body) => {
202
202
  const token = _ctx.query?.token as string | undefined
203
203
  if (!token) throw new Error('Token is required')
204
204
 
@@ -0,0 +1,15 @@
1
+ -- Seed the Spine system master account required by the auth trigger and existing-account registration flow
2
+ INSERT INTO public.accounts (id, slug, display_name, description, data, is_active, design_schema, validation_schema, type_id)
3
+ SELECT
4
+ gen_random_uuid(),
5
+ 'spine-system',
6
+ 'Spine System',
7
+ 'Master system account for internal Spine operations',
8
+ '{}'::jsonb,
9
+ true,
10
+ '{}'::jsonb,
11
+ '{}'::jsonb,
12
+ id
13
+ FROM public.types
14
+ WHERE kind = 'account' AND slug = 'account'
15
+ ON CONFLICT (slug) DO NOTHING;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spine-framework",
3
- "version": "0.3.134",
3
+ "version": "0.3.135",
4
4
  "description": "Multi-tenant, modular application platform for modern SaaS systems",
5
5
  "type": "module",
6
6
  "bin": {
@@ -26,6 +26,7 @@
26
26
  ".framework/migrations/008_items_target.sql",
27
27
  ".framework/migrations/009_roles_slug_unique.sql",
28
28
  ".framework/migrations/010_auth_user_trigger.sql",
29
+ ".framework/migrations/011_spine_system_account.sql",
29
30
  ".framework/public/",
30
31
  ".framework/scripts/",
31
32
  ".framework/seeds/",