spine-framework 0.3.13 → 0.3.15

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.
@@ -346,6 +346,44 @@ async function upsertRoles(appId: string, records: any[], dryRun: boolean): Prom
346
346
  return result
347
347
  }
348
348
 
349
+ async function upsertIntegrations(appId: string, records: any[], dryRun: boolean): Promise<SeedResult> {
350
+ const result: SeedResult = { table: 'integrations', inserted: 0, skipped: 0, errors: [] }
351
+
352
+ for (const record of records) {
353
+ if (dryRun) {
354
+ console.log(` [dry-run] Would upsert integration: ${record.name}`)
355
+ result.inserted++
356
+ continue
357
+ }
358
+
359
+ // Only include fields that exist in the database schema
360
+ const cleanRecord = {
361
+ name: record.name,
362
+ slug: record.slug,
363
+ provider: record.provider,
364
+ status: record.status,
365
+ is_active: record.is_active,
366
+ config: record.config,
367
+ app_id: appId,
368
+ }
369
+
370
+ const { error } = await adminDb
371
+ .from('integrations')
372
+ .upsert(cleanRecord, {
373
+ onConflict: 'slug',
374
+ ignoreDuplicates: false
375
+ })
376
+
377
+ if (error) {
378
+ result.errors.push(`${record.slug}: ${error.message}`)
379
+ } else {
380
+ result.inserted++
381
+ }
382
+ }
383
+
384
+ return result
385
+ }
386
+
349
387
  const SEED_HANDLERS: Record<string, (appId: string, records: any[], dryRun: boolean) => Promise<SeedResult>> = {
350
388
  'types.json': upsertTypes,
351
389
  'link-types.json': upsertLinkTypes,
@@ -353,6 +391,7 @@ const SEED_HANDLERS: Record<string, (appId: string, records: any[], dryRun: bool
353
391
  'accounts.json': upsertAccounts,
354
392
  'pipelines.json': upsertPipelines,
355
393
  'roles.json': upsertRoles,
394
+ 'integrations.json': upsertIntegrations,
356
395
  }
357
396
 
358
397
  async function recordInstallation(
package/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ---
6
6
 
7
+ ## [0.3.15] — 2026-06-09
8
+ - Fixed `upsertIntegrations` in install-app.ts — now explicitly picks only valid DB columns (name, slug, provider, status, is_active, config) instead of spreading entire record, preventing "description column not found" errors
9
+
10
+ ## [0.3.14] — 2026-06-09
11
+ - Fixed `integrations.json` handler config format — changed `"handler": "funnel-signal"` to `"handler": { "path": "funnel-signal" }` to match `integration-routes.ts` step 8 lookup at `config.handler?.path`
12
+ - Removed orphaned `on_funnel_signal_created` trigger from `triggers.json` — the trigger engine routes exclusively through `runPipeline(trigger.pipeline_id, ...)` and has no path to directly invoke a custom function; scoring now happens inline in `custom_funnel-signal.ts`
13
+ - Removed orphaned `funnel-scoring-trigger` handler registration from `webhook-handlers.ts`
14
+ - Deleted orphaned `custom_funnel-scoring-trigger.ts` file
15
+ - Restored `custom_funnel-signal.ts` as complete inline handler — validates, resolves IDs, fetches prior signals, scores, inserts signal item, updates account/anonymous session, creates links, and evaluates queue entries
16
+
7
17
  ## [0.3.13] — 2026-06-09
8
18
  - Fixed `assemble-functions.sh`: now also copies functions from `custom/apps/*/functions/` so installed app handlers (e.g. `custom_funnel-signal.ts`) are included in the assembled output — previously only `custom/functions/` was swept, causing "Signal handler not available" at runtime
9
19
 
@@ -1 +1 @@
1
- {"version":3,"file":"install-app.d.ts","sourceRoot":"","sources":["../../../.framework/cli/commands/install-app.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAwlBxC,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,QAgB1D"}
1
+ {"version":3,"file":"install-app.d.ts","sourceRoot":"","sources":["../../../.framework/cli/commands/install-app.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AA+nBxC,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,QAgB1D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spine-framework",
3
- "version": "0.3.13",
3
+ "version": "0.3.15",
4
4
  "private": false,
5
5
  "description": "Spine — enterprise application framework built on Supabase + Netlify + React",
6
6
  "type": "module",