UNPKG

@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
import{validatorKindToSqlType as i}from"./diffSnapshots-BbwCuhoN.mjs";const r=e=>e.kind==="optional"&&e.inner?{nullable:!0,sqlType:i(e.inner.kind)}:{nullable:!1,sqlType:i(e.kind)},f=e=>e==="global",c=e=>{const s={};for(const o of e.tables){if(!f(o.shardMode))continue;const a={};for(const[n,t]of Object.entries(o.shape))a[n]=r(t);const l={};for(const n of o.indexes)l[n.name]={fields:[...n.fields],name:n.name,unique:n.unique??!1};s[o.name]={columns:a,indexes:l,name:o.name}}return{tables:s,version:1}};export{c as default};