@supabase/lite 0.6.1-next.2 → 0.6.1-next.3

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.
package/dist/cli/index.js CHANGED
@@ -183,7 +183,8 @@ ${e.map(a=>`${s}| ${Object.entries(a).filter(([l])=>!t?.omitKeys?.includes(l)).m
183
183
  `)}${i}`}async function Z(e){try{await e(),process.exit(0);}catch(t){(process.env.LOCAL||process.env.DEBUG)&&console.error(t),K.error(String(t)),process.exit(1);}}var ym,Ie=y(()=>{ym=ee(ie());Xe();});function Sm(e){return typeof e=="object"&&e!==null&&"text"in e&&"values"in e}function hx(e,t){if(e==null)return e;switch(t){case 20:return typeof e=="bigint"?e:BigInt(e);case 22:return Array.isArray(e)?e:typeof e=="string"?e.split(" ").map(Number).filter(r=>!Number.isNaN(r)):e;case 1002:case 1009:case 1015:return typeof e=="string"?bm(e,mx):e;case 1005:case 1007:case 1016:return typeof e=="string"?bm(e,dx):e;default:return e}}function pl(e){return {async query(t,r){let n=Sm(t)?t.text:t,s=Sm(t)?t.values:r??[],i=await e.driver.query(n,[...s]);return {rows:i.rows.map(a=>Object.fromEntries(i.fields.map(l=>[l.name,hx(a[l.name],l.dataTypeID)])))}}}}var bm,mx,dx,Em=y(()=>{bm=(e,t=r=>r)=>{if(!e||e==="{}")return [];let r=e.slice(1,-1);if(r==="")return [];let n=[],s="",i=false,o=0;for(let a=0;a<r.length;a++){let l=r[a];l==='"'&&r[a-1]!=="\\"?(i=!i,s+=l):l==="{"&&!i?(o++,s+=l):l==="}"&&!i?(o--,s+=l):l===","&&!i&&o===0?(n.push(t(s)),s=""):s+=l;}return s!==""&&n.push(t(s)),n},mx=e=>e==="NULL"?null:e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1).replace(/\\(.)/g,"$1"):e,dx=e=>e==="NULL"?null:Number.parseInt(e,10);});function wx(e,t){let r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`(?<![\\w$"])${r}\\.`);return e.some(s=>n.test(s))}function xm(e,t){let r=new Set;for(let n of t)for(let s of n.matchAll(yx))r.add(s[1]);return Object.values(e.schemas).map(n=>n.name).filter(n=>!gx.has(n)&&!r.has(n)&&wx(t,n)).map(n=>`CREATE SCHEMA IF NOT EXISTS ${n};`)}var gx,yx,_m=y(()=>{gx=new Set(["public","supabase_migrations"]),yx=/\bCREATE\s+SCHEMA\b(?:\s+IF\s+NOT\s+EXISTS)?\s+("?[\w$]+"?)/gi;});async function Sx(){try{return await import('@supabase/pg-delta')}catch(e){throw new Error("Postgres schema diffing requires pg-delta to be available.",{cause:e})}}function Ex(e){let t=/^drop table (.+)$/.exec(e);if(t)return {table:t[1],reason:"drop table"};let r=/^drop column (.+) on (.+)$/.exec(e);if(r)return {table:r[2],reason:`drop column ${r[1]}`};let n=/^drop sequence (.+)$/.exec(e);return n?{table:n[1],reason:"drop sequence"}:{table:"unknown",reason:e}}function xx(e,t){let r=Us(e),n=new Set([...mt(e),...mt(t)]);return new Set(or.filter(s=>n.has(s)&&!r.has(s)))}function _x(e){let t=e.trimEnd();return t.endsWith(";")?t:`${t};`}async function $m(e,t,r=""){let{createPlan:n,extractCatalog:s}=await Sx(),{PgliteConnection:i}=await Ue("@supabase/lite/pglite","pglite","@electric-sql/pglite"),o=new i,a=new i;try{let l=Hf(t),c=xx(e,t),u=mt(t);await o.exec(ft(c)),await a.exec(ft(u)),o.config.baseSchema&&await o.exec(o.config.baseSchema),a.config.baseSchema&&await a.exec(a.config.baseSchema),r.trim()&&(await o.exec(r),await a.exec(r)),e.trim()&&await o.exec(e),t.trim()&&await a.exec(t);let p=await s(pl(o)),f=await s(pl(a)),g=await n(p,f);if(!g)return "";if(g.plan.risk?.level==="data_loss")throw new DataLossError(g.plan.risk.statements.map(Ex));let d=g.plan.statements.filter(w=>!Wf(w,l));return [...xm(f,d),...d.map(_x)].join(`
184
184
 
185
185
  `)}finally{await o.close().catch(()=>{}),await a.close().catch(()=>{});}}var vm=y(()=>{Qt();Em();_m();hn();});var Cm={};de(Cm,{checkPendingDeclarativeSchema:()=>Am,db:()=>Ax});async function Am(e,t){let r=await fe(e);if(!r)return {hint:false,reason:"no-schemas"};try{let s=await e.connection.createMigrator(r).diff();return (typeof s.diff=="string"?s.diff.trim().length>0:s.diff.has_changes)?{hint:!0,reason:"pending"}:{hint:!1,reason:"in-sync"}}catch{return {hint:false,reason:"diff-failed"}}}async function Tm(e){let t=await dt(e),r=await fe(t);if(!r&&!t.connection.config.baseSchema){console.log(_e.default.dim("No schema files found."));return}let s=await t.connection.createMigrator(r).diff();if(typeof s.diff!="string"&&!s.diff.has_changes){console.log(_e.default.dim("Schema in sync."));return}pt(s);}var _e,Tx,Ax,Rm=y(()=>{_e=ee(ie());Ie();Ua();Be();Ct();vm();Ee();Je();bt();Bs();Be();Tx="Local Development:";Ax=e=>{let t=e.command("db").description("Database operations").helpGroup(Tx);t.command("diff").description("Diff current DB against schemas/*.sql; with -f, emit a pg migration file").option("--config <config>","Path to the config file").option("-f, --file <name>","Write the diff as a new migration file with this name").action(async r=>{console.log(),await Z(async()=>{if(await Y(r.config),!r.file){await Tm(r.config);return}let n=await dt(r.config),s=await Rs(n),i=await fe(n);if(!i.trim()){console.log(_e.default.dim("No declarative schemas found \u2014 nothing to diff."));return}let o="";try{o=await $m(s,i,n.connection.config.baseSchema??"");}catch(u){if(u instanceof DataLossError){console.log(_e.default.yellow("Declarative diff includes potentially destructive changes.")),console.log(_e.default.dim("Review the schema manually and author an explicit migration for drops or other data-loss changes."));return}throw u}if(!o.trim()){console.log(_e.default.green("Schema in sync \u2014 no migration written."));return}let a=We__default.join(process.cwd(),"supabase",At(n));ke(a);let l=aa(r.file,oa()),c=We__default.join(a,l);await pe__default.writeFile(c,o+`
186
- `,{flag:"wx"}),console.log(_e.default.green(" \u279C"),"Wrote migration",_e.default.cyan(We__default.relative(process.cwd(),c)));});}),t.command("reset").description(ge("Drop user objects, clear history, replay migrations + seed")).option("--config <config>","Path to the config file").option("--no-seed","Skip running seed.sql after replay").action(async r=>{console.log(),await Z(async()=>{await Y(r.config);let n=await dt(r.config),i=(await n.connection.introspect()).tables.filter(p=>p.type==="table"),o=n.connection.dialect==="postgres",a=(p,f)=>o&&p?`"${p}"."${f}"`:`"${p?`${p}.${f}`:f}"`,l=[];for(let p of i)l.push(`DROP TABLE IF EXISTS ${a(p.schema,p.name)}${o?" CASCADE":""}`);l.push("DROP TABLE IF EXISTS migrations"),o?l.push("DROP SCHEMA IF EXISTS supabase_migrations CASCADE"):(l.push('DROP TABLE IF EXISTS "supabase_migrations.schema_migrations"'),l.push('DROP TABLE IF EXISTS "supabase_migrations.seed_files"'));for(let p of l)try{await n.connection.exec(p);}catch{}await n.connection.clearSchemaCache();let c=await jt(n);for(let p of c.applied)console.log(_e.default.green(" \u2713"),"Applied",_e.default.cyan(p.filename));(await Am(n,c.applied.length)).hint&&(console.log(),console.log(_e.default.yellow("Declarative schemas detected with pending changes.")),console.log(_e.default.dim("Run `lite db diff -f <name>` to generate a migration, then re-run `lite db reset`."))),r.seed!==!1&&await fn(n).catch(p=>console.error(_e.default.yellow("Seed warning: "+String(p)))),console.log(_e.default.green("Database reset."));});}),t.command("query").description("Execute a SQL statement against the local or remote project").argument("<statement>","The statement to execute").option("--remote","Execute the statement on the remote project",false).option("--config <config>","Path to the config file").action(async(r,n)=>{console.log(),await Z(async()=>{n.remote||await Y(n.config);let s=await dt(n.remote?!0:n.config);console.log(`Executing: ${_e.default.cyan(r)}`);let i=await s.connection.exec(r);console.log(i);});}),t.command("schema").description(ge("Print the current database schema")).option("--diff","Diff current DB against schemas/*.sql",false).option("--sql","Print raw CREATE statements from sqlite_master",false).option("--config <config>","Path to the config file").action(async r=>{console.log(),await Z(async()=>{if(await Y(r.config),r.diff){await Tm(r.config);return}let s=await(await dt(r.config)).connection.introspect();if(r.sql){let i=[...s.tables.map(o=>o.sql),...s.views.map(o=>o.sql),...s.triggers.map(o=>o.sql)].filter(o=>o&&o.trim().length>0);console.log(i.join(`;
186
+ `,{flag:"wx"}),console.log(_e.default.green(" \u279C"),"Wrote migration",_e.default.cyan(We__default.relative(process.cwd(),c)));});}),t.command("reset").description(ge("Drop user objects, clear history, replay migrations + seed")).option("--config <config>","Path to the config file").option("--no-seed","Skip running seed.sql after replay").action(async r=>{console.log(),await Z(async()=>{await Y(r.config);let n=await dt(r.config),s=n.connection.dialect==="postgres",i=[];if(s){let{rows:l}=await n.connection.exec(`SELECT nspname AS name FROM pg_namespace
187
+ WHERE nspname NOT LIKE 'pg\\_%' AND nspname <> 'information_schema'`);for(let c of l)i.push(`DROP SCHEMA IF EXISTS "${c.name.replace(/"/g,'""')}" CASCADE`);i.push("CREATE SCHEMA IF NOT EXISTS public AUTHORIZATION pg_database_owner");}else {let c=(await n.connection.introspect()).tables.filter(p=>p.type==="table"),u=(p,f)=>`"${p?`${p}.${f}`:f}"`;for(let p of c)i.push(`DROP TABLE IF EXISTS ${u(p.schema,p.name)}`);i.push("DROP TABLE IF EXISTS migrations"),i.push('DROP TABLE IF EXISTS "supabase_migrations.schema_migrations"'),i.push('DROP TABLE IF EXISTS "supabase_migrations.seed_files"');}for(let l of i)try{await n.connection.exec(l);}catch{}await n.connection.clearSchemaCache();let o=await jt(n);for(let l of o.applied)console.log(_e.default.green(" \u2713"),"Applied",_e.default.cyan(l.filename));(await Am(n,o.applied.length)).hint&&(console.log(),console.log(_e.default.yellow("Declarative schemas detected with pending changes.")),console.log(_e.default.dim("Run `lite db diff -f <name>` to generate a migration, then re-run `lite db reset`."))),r.seed!==!1&&await fn(n).catch(l=>console.error(_e.default.yellow("Seed warning: "+String(l)))),console.log(_e.default.green("Database reset."));});}),t.command("query").description("Execute a SQL statement against the local or remote project").argument("<statement>","The statement to execute").option("--remote","Execute the statement on the remote project",false).option("--config <config>","Path to the config file").action(async(r,n)=>{console.log(),await Z(async()=>{n.remote||await Y(n.config);let s=await dt(n.remote?!0:n.config);console.log(`Executing: ${_e.default.cyan(r)}`);let i=await s.connection.exec(r);console.log(i);});}),t.command("schema").description(ge("Print the current database schema")).option("--diff","Diff current DB against schemas/*.sql",false).option("--sql","Print raw CREATE statements from sqlite_master",false).option("--config <config>","Path to the config file").action(async r=>{console.log(),await Z(async()=>{if(await Y(r.config),r.diff){await Tm(r.config);return}let s=await(await dt(r.config)).connection.introspect();if(r.sql){let i=[...s.tables.map(o=>o.sql),...s.views.map(o=>o.sql),...s.triggers.map(o=>o.sql)].filter(o=>o&&o.trim().length>0);console.log(i.join(`;
187
188
 
188
189
  `)+(i.length?";":""));return}Uf(s);});});};});var km={};de(km,{migration:()=>Px});var ae,kx,Px,Pm=y(()=>{ae=ee(ie());Be();Ct();Bs();Cs();Ce();Ee();Je();kx="Local Development:",Px=e=>{let t=e.command("migration").description("Manage database migrations").helpGroup(kx);t.command("diff").description(ge("Diff DB state against schemas/*.sql")).option("--config <config>","Path to the config file").option("--execute","Execute the migration").option("--force","Force the migration",false).option("--sql","Show the SQL for the migration",false).option("--seed","Seed the database with data",false).action(async r=>{await Y(r.config);let s=await(await z({withSupabaseClient:false})).project.local.createApp(r.config),i=await fe(s),o=s.connection.createMigrator(i),a=await o.diff();if(console.log(),a.plan.steps.length>0){pt(a);let l=null;try{r.execute&&(await o.migratePlan(a.plan,{force:r.force??!1}),ja(a),console.log());}catch(c){l=c;}if(r.sql){let c=r.execute?l?ae.default.red:ae.default.green:ae.default.cyan;console.log(c(mn(a,{colorize:true})));}l&&(l instanceof DataLossError&&(console.log(),console.warn(ae.default.yellow("Migration would potentially cause data loss. Rerun with --force to proceed.")),process.exit(1)),console.error(ae.default.red("Migration error: "+String(l))),process.exit(1)),r.execute||console.log(ae.default.yellow("Migration not executed. Use --execute to execute."));}else console.log(ae.default.green("No changes to migrate."));r.seed&&await Da(s),process.exit(0);}),t.command("new").description("Create a new empty migration file").argument("<name>","The migration name").option("--config <config>","Path to the config file").action(async(r,n)=>{await Y(n.config);let i=await(await z({withSupabaseClient:false})).project.local.createApp(n.config),o=await Sf(i,r);console.log(ae.default.green(" \u279C"),"Created",ae.default.cyan(We__default.relative(process.cwd(),o))),process.exit(0);}),t.command("up").description("Apply pending migrations from the migrations directory").option("--config <config>","Path to the config file").option("--dry-run","Print pending migrations without applying",false).action(async r=>{await Y(r.config);let s=await(await z({withSupabaseClient:false})).project.local.createApp(r.config);if(r.dryRun){await Hr(s.connection);let i=new Set(await Wr(s.connection)),a=(await Ke(s)).filter(l=>!i.has(l.version));a.length===0&&(console.log(ae.default.green("No pending migrations.")),process.exit(0)),console.log(ae.default.dim("Pending:"));for(let l of a)console.log(" "+ae.default.cyan(l.filename));process.exit(0);}try{let i=await jt(s);if(i.applied.length===0)console.log(ae.default.green("Local database is up to date."));else for(let o of i.applied)console.log(ae.default.green(" \u2713"),"Applied",ae.default.cyan(o.filename));process.exit(0);}catch(i){console.error(ae.default.red("Migration failed: "+String(i.message??i))),process.exit(1);}}),t.command("list").description("List applied and pending migrations").option("--config <config>","Path to the config file").action(async r=>{await Y(r.config);let s=await(await z({withSupabaseClient:false})).project.local.createApp(r.config);await Hr(s.connection);let i=new Set(await Wr(s.connection)),o=await Ke(s);console.log(ae.default.dim(`Migrations in ${At(s)}:`)),o.length===0&&console.log(ae.default.dim(" (none)"));for(let c of o){let u=i.has(c.version)?ae.default.green("[applied]"):ae.default.yellow("[pending]");console.log(` ${u} ${ae.default.cyan(c.filename)}`);}let a=new Set(o.map(c=>c.version)),l=[...i].filter(c=>!a.has(c));if(l.length>0){console.log(),console.log(ae.default.dim("Recorded versions without matching file:"));for(let c of l)console.log(` ${ae.default.red("[orphan]")} ${c}`);}process.exit(0);});};});function Ox(e){let t=(e??process.env.SUPABASE_ENDPOINT??Nx).replace(/\/+$/,""),r=new URL(t),n=r.host;return {apiUrl:`${r.protocol}//${n.startsWith("api.")?n:`api.${n}`}`,projectDomain:n==="supabase.com"?"supabase.co":n}}function Nm(e){if(Array.isArray(e)){let t=e.find(n=>n.name==="anon")?.api_key??"",r=e.find(n=>n.name==="service_role")?.api_key??"";return {anon:t,service_role:r}}return e}var Nx,ai,Om=y(()=>{Nx="https://supabase.com";ai=class{constructor(t,r){this.token=t;if(!t)throw new Error("Supabase access token required");let n=Ox(r?.endpoint);this.apiUrl=n.apiUrl,this.projectDomain=n.projectDomain;}apiUrl;projectDomain;async request(t,r,n){let s=await fetch(`${this.apiUrl}${r}`,{method:t,headers:{Authorization:`Bearer ${this.token}`,"Content-Type":"application/json",Accept:"application/json"},body:n===void 0?void 0:JSON.stringify(n)});if(!s.ok){let o=await s.text().catch(()=>"");throw new Error(`Supabase API ${t} ${r} failed: ${s.status} ${s.statusText}${o?` \u2014 ${o}`:""}`)}return (s.headers.get("content-type")??"").includes("application/json")?await s.json():await s.text()}listOrganizations(){return this.request("GET","/v1/organizations")}async validateToken(){try{return await this.listOrganizations(),!0}catch{return false}}listRegions(t){return this.request("GET",`/v1/projects/available-regions?organization_slug=${encodeURIComponent(t)}`)}createProject(t){return this.request("POST","/v1/projects",t)}getProject(t){return this.request("GET",`/v1/projects/${t}`)}getApiKeys(t){return this.request("GET",`/v1/projects/${t}/api-keys`)}updateAuthConfig(t,r){return this.request("PATCH",`/v1/projects/${t}/config/auth`,r)}createSigningKey(t,r){return this.request("POST",`/v1/projects/${t}/config/auth/signing-keys`,r)}runSql(t,r){return this.request("POST",`/v1/projects/${t}/database/query`,{query:r})}async waitForActive(t,r={}){let n=r.timeoutMs??6e5,s=r.intervalMs??5e3,i=Date.now();for(;;){let o=await this.getProject(t);if(r.onTick?.(o.status),o.status==="ACTIVE_HEALTHY")return o;if(Date.now()-i>n)throw new Error(`Timed out waiting for project ${t} to become ACTIVE_HEALTHY (last status: ${o.status})`);await new Promise(a=>setTimeout(a,s));}}};});function Lx(e){if(e==null||typeof e!="string")return true;try{return JSON.parse(e),!0}catch{return false}}function Dx(e){return e==null?true:typeof e!="string"?false:Ix.test(e)}function jx(e){if(e==null)return true;if(typeof e=="number")return Number.isFinite(e);if(typeof e!="string")return false;let t=Date.parse(e);return !Number.isNaN(t)}function Im(e){if(!e)return;let t=e.match(/varchar\s*\(\s*(\d+)\s*\)/i);return t?Number(t[1]):void 0}function Lm(e){return e?/jsonb?/i.test(e):false}function Dm(e){return e?/\buuid\b/i.test(e):false}function jm(e){return e?/timestamp(tz)?|timestamp with|timestamp without/i.test(e):false}async function Fm(e){let t=await e.connection.introspect(),r=[],n=e.connection.dialect;for(let s of t.tables){let i=s.name,o=s.schema,a=n==="sqlite"&&o&&o!=="main"?`"${o}.${i}"`:o?`"${o}"."${i}"`:`"${i}"`,l=t.columns.filter(g=>g.table===i&&(g.schema??o)===o),c=0,u=[];try{let g=await e.connection.exec(`SELECT COUNT(*) as c FROM ${a}`);c=Number(g?.rows?.[0]?.c??0);}catch{r.push({table:i,schema:o,rowCount:0,issues:u});continue}if(c===0){r.push({table:i,schema:o,rowCount:c,issues:u});continue}let p=l.filter(g=>Lm(g.type)||Dm(g.type)||jm(g.type)||Im(g.type)!==void 0);if(p.length===0){r.push({table:i,schema:o,rowCount:c,issues:u});continue}let f=p.map(g=>`"${g.name}"`).join(", ");try{let d=(await e.connection.exec(`SELECT ${f} FROM ${a}`))?.rows??[];for(let m of d)for(let w of p){let h=m[w.name];if(Lm(w.type)&&!Lx(h)){u.push({table:i,column:w.name,kind:"invalid_json",message:`row contains non-parseable JSON in ${i}.${w.name}`});continue}if(Dm(w.type)&&h!=null&&!Dx(h)){u.push({table:i,column:w.name,kind:"invalid_uuid",message:`row contains invalid UUID in ${i}.${w.name}`});continue}if(jm(w.type)&&!jx(h)){u.push({table:i,column:w.name,kind:"invalid_timestamp",message:`row contains unparseable timestamp in ${i}.${w.name}`});continue}let S=Im(w.type);S!==void 0&&typeof h=="string"&&h.length>S&&u.push({table:i,column:w.name,kind:"varchar_overflow",message:`value exceeds varchar(${S}) in ${i}.${w.name}`});}}catch{}r.push({table:i,schema:o,rowCount:c,issues:u});}return r}var Ix,Mm=y(()=>{Ix=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;});function gt(e){let t=[],r="",n=0,s=false,i=false,o=false,a=false,l=null;for(;n<e.length;){let u=e[n],p=e[n+1];if(o){r+=u,u===`
189
190
  `&&(o=false),n++;continue}if(a){if(r+=u,u==="*"&&p==="/"){r+=p,n+=2,a=false;continue}n++;continue}if(l){if(r+=u,u==="$"&&e.startsWith(l,n)){r+=e.slice(n+1,n+l.length),n+=l.length,l=null;continue}n++;continue}if(s){if(r+=u,u==="'"&&p==="'"){r+=p,n+=2;continue}u==="'"&&(s=false),n++;continue}if(i){if(r+=u,u==='"'&&p==='"'){r+=p,n+=2;continue}u==='"'&&(i=false),n++;continue}if(u==="-"&&p==="-"){o=true,r+=u,n++;continue}if(u==="/"&&p==="*"){a=true,r+=u,n++;continue}if(u==="'"){s=true,r+=u,n++;continue}if(u==='"'){i=true,r+=u,n++;continue}if(u==="$"){let f=e.slice(n).match(/^\$[A-Za-z0-9_]*\$/);if(f){l=f[0],r+=f[0],n+=f[0].length;continue}}if(u===";"){let f=r.trim();f&&t.push(f),r="",n++;continue}r+=u,n++;}let c=r.trim();return c&&t.push(c),t}var li=y(()=>{});async function ci(e,t){let n=e.connection.dialect==="sqlite"?`"auth.${t}"`:`auth."${t}"`;try{let s=await e.connection.exec(`SELECT COUNT(*) as c FROM ${n}`);return Number(s?.rows?.[0]?.c??0)}catch{return 0}}async function Um(e){let t=[],r=[],n=false;try{await e.connection.exec("SELECT 1"),n=!0;}catch(l){t.push(`Database not reachable: ${String(l)}`);}let s=await fe(e),i=gt(s);i.length===0&&t.push("No schema statements found in supabase/schemas/*.sql");let o=[];if(n)try{o=await Fm(e);}catch(l){r.push(`Data validation skipped: ${String(l)}`);}for(let l of o)for(let c of l.issues)r.push(`${c.kind}: ${c.message}`);let a={users:0,sessions:0,refresh_tokens:0,identities:0,jwt_secret_set:!!e.config.auth?.jwt_secret};return n&&(a.users=await ci(e,"users"),a.sessions=await ci(e,"sessions"),a.refresh_tokens=await ci(e,"refresh_tokens"),a.identities=await ci(e,"identities")),a.jwt_secret_set||r.push("auth.jwt_secret is not configured \u2014 tokens will not survive upgrade"),e.config.storage?.enabled&&r.push("Storage is enabled but migration is not yet supported"),e.config.realtime?.enabled&&r.push("Realtime config migration is not yet supported"),{ok:t.length===0,errors:t,warnings:r,dbReachable:n,schemaStatementCount:i.length,schemaBytes:s.length,tables:o,auth:a}}var Bm=y(()=>{Be();Mm();li();});var ml,qm=y(()=>{ml=`-- supabase/auth core schema (Postgres)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supabase/lite",
3
- "version": "0.6.1-next.2",
3
+ "version": "0.6.1-next.3",
4
4
  "description": "Lightweight TypeScript-native Supabase implementation on SQLite (alpha). PostgREST + GoTrue compatible — use @supabase/supabase-js as-is.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",