@lunora/cli
Version:
The Lunora CLI: init, dev, deploy, codegen, migrate, seed, doctor, insights, logs, registry, and the rest of the project commands
3 lines (2 loc) • 918 B
JavaScript
const a=e=>`${JSON.stringify({end:!0,rows:e})}
`,n=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return;const r=e;if(!(r.end!==!0||r.table!==void 0))return typeof r.rows=="number"&&Number.isSafeInteger(r.rows)&&r.rows>=0?r.rows:Number.NaN},s=()=>{let e=0,r;return{problem:()=>r===void 0?'the export has no end marker: it was written before exports carried an end marker, or it was cut short. If you have checked that the file is complete, append {"end":true,"rows":N} as its last line, N being its exact row count':r===e?void 0:`the export's end marker declares ${String(r)} row(s) but ${String(e)} were read`,read:o=>{if(r!==void 0)throw new Error("the export continues after its end marker");const t=n(o);return t===void 0?(e+=1,!0):(r=t,!1)}}},i="/_lunora/admin/export",d="/_lunora/admin/import",u="/_lunora/admin/storage",c="/_lunora/admin/storage/url";export{i as E,d as I,u as S,a,c as b,s as c,n as e};