UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 863 B
import{u as e}from"./openclaw-state-read-sqlite-post-commit-CsXPYVOo.mjs";import{n as t,t as n}from"./openclaw-state-read-openclaw-state-db-B3dGXm7m.mjs";import{f as r,x as i}from"./openclaw-state-read-openclaw-state-db-legacy-backfills-CP_449sp.mjs";import{t as a}from"./openclaw-state-read-sqlite-schema-ensure-Bksnvnd1.mjs";import{t as o}from"./openclaw-state-read-openclaw-state-feature-schema-BaBHFVL8.mjs";function createOpenClawStateSchemaEnsurer(s){let c=o(s.table,{endMarker:s.endMarker??` ) STRICT; `,errorMessage:`Canonical state schema markers are missing for ${s.table}`}),l=a(()=>c,{tables:[s.table,...s.additionalTables??[]],indexes:s.indexes});return(a={})=>{let{db:o}=n(a),runWrite=n=>t(({db:t})=>{e(t)?r(t,s.table):n(t)},a,{operationLabel:s.operationLabel});e(o)?i(o,()=>runWrite(l)):l(o,runWrite)}}export{createOpenClawStateSchemaEnsurer as t};