@lunora/cli
Version:
The Lunora CLI: init, dev, deploy, codegen, migrate, seed, doctor, insights, logs, registry, and the rest of the project commands
2 lines (1 loc) • 525 B
JavaScript
import{validatorKindToSqlType as a}from"./diffSnapshots-CIOFQN_a.mjs";const r=e=>e.kind==="optional"&&e.inner?{nullable:!0,sqlType:a(e.inner.kind)}:{nullable:!1,sqlType:a(e.kind)},u=e=>e==="global",f=e=>{const s={};for(const o of e.tables){if(!u(o.shardMode))continue;const l={};for(const[n,i]of Object.entries(o.shape))l[n]=r(i);const t={};for(const n of o.indexes)t[n.name]={fields:[...n.fields],name:n.name,unique:n.unique??!1};s[o.name]={columns:l,indexes:t,name:o.name}}return{tables:s,version:1}};export{f as default};