spine-framework 0.3.13 → 0.3.14

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,36 @@ 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
+ const { error } = await adminDb
360
+ .from('integrations')
361
+ .upsert({
362
+ ...record,
363
+ app_id: appId,
364
+ }, {
365
+ onConflict: 'app_id,name',
366
+ ignoreDuplicates: false
367
+ })
368
+
369
+ if (error) {
370
+ result.errors.push(`${record.name}: ${error.message}`)
371
+ } else {
372
+ result.inserted++
373
+ }
374
+ }
375
+
376
+ return result
377
+ }
378
+
349
379
  const SEED_HANDLERS: Record<string, (appId: string, records: any[], dryRun: boolean) => Promise<SeedResult>> = {
350
380
  'types.json': upsertTypes,
351
381
  'link-types.json': upsertLinkTypes,
@@ -353,6 +383,7 @@ const SEED_HANDLERS: Record<string, (appId: string, records: any[], dryRun: bool
353
383
  'accounts.json': upsertAccounts,
354
384
  'pipelines.json': upsertPipelines,
355
385
  'roles.json': upsertRoles,
386
+ 'integrations.json': upsertIntegrations,
356
387
  }
357
388
 
358
389
  async function recordInstallation(
package/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ---
6
6
 
7
+ ## [0.3.14] — 2026-06-09
8
+ - 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`
9
+ - 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`
10
+ - Removed orphaned `funnel-scoring-trigger` handler registration from `webhook-handlers.ts`
11
+ - Deleted orphaned `custom_funnel-scoring-trigger.ts` file
12
+ - 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
13
+
7
14
  ## [0.3.13] — 2026-06-09
8
15
  - 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
16
 
@@ -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;AAunBxC,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.14",
4
4
  "private": false,
5
5
  "description": "Spine — enterprise application framework built on Supabase + Netlify + React",
6
6
  "type": "module",