Edit: /tmp/tsx-0/17887-952f78611a85de1c6b9029477a3e89e80eeb542d (2610B)
{"code":"__filename=\"/opt/canhelp/node_modules/better-auth/dist/db/get-schema.mjs\";(()=>{\nvar __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __name=(target,value)=>__defProp(target,\"name\",{value,configurable:true});var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:true})};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from===\"object\"||typeof from===\"function\"){for(let key of __getOwnPropNames(from))if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable})}return to};var __toCommonJS=mod=>__copyProps(__defProp({},\"__esModule\",{value:true}),mod);var get_schema_exports={};__export(get_schema_exports,{getSchema:()=>getSchema});module.exports=__toCommonJS(get_schema_exports);var import_db=require(\"@better-auth/core/db\");function getSchema(config){const tables=(0,import_db.getAuthTables)(config);const schema={};for(const key in tables){const table=tables[key];const fields=table.fields;const actualFields={};Object.entries(fields).forEach(([key2,field])=>{actualFields[field.fieldName||key2]=field;if(field.references){const refTable=tables[field.references.model];if(refTable)actualFields[field.fieldName||key2].references={...field.references,model:refTable.modelName,field:field.references.field}}});if(schema[table.modelName]){schema[table.modelName].fields={...schema[table.modelName].fields,...actualFields};continue}schema[table.modelName]={fields:actualFields,order:table.order||Infinity}}return schema}__name(getSchema,\"getSchema\");0&&(module.exports={getSchema});\n})()\n","warnings":[],"map":{"version":3,"mappings":";suBAAA,+IAA8B,gCAG9B,SAAS,UAAU,OAAQ,CAC1B,MAAM,UAAS,yBAAc,MAAM,EACnC,MAAM,OAAS,CAAC,EAChB,UAAW,OAAO,OAAQ,CACzB,MAAM,MAAQ,OAAO,GAAG,EACxB,MAAM,OAAS,MAAM,OACrB,MAAM,aAAe,CAAC,EACtB,OAAO,QAAQ,MAAM,EAAE,QAAQ,CAAC,CAACA,KAAK,KAAK,IAAM,CAChD,aAAa,MAAM,WAAaA,IAAG,EAAI,MACvC,GAAI,MAAM,WAAY,CACrB,MAAM,SAAW,OAAO,MAAM,WAAW,KAAK,EAC9C,GAAI,SAAU,aAAa,MAAM,WAAaA,IAAG,EAAE,WAAa,CAC/D,GAAG,MAAM,WACT,MAAO,SAAS,UAChB,MAAO,MAAM,WAAW,KACzB,CACD,CACD,CAAC,EACD,GAAI,OAAO,MAAM,SAAS,EAAG,CAC5B,OAAO,MAAM,SAAS,EAAE,OAAS,CAChC,GAAG,OAAO,MAAM,SAAS,EAAE,OAC3B,GAAG,YACJ,EACA,QACD,CACA,OAAO,MAAM,SAAS,EAAI,CACzB,OAAQ,aACR,MAAO,MAAM,OAAS,QACvB,CACD,CACA,OAAO,MACR,CA/BS","names":["key"],"ignoreList":[],"sources":["/opt/canhelp/node_modules/better-auth/dist/db/get-schema.mjs"],"sourcesContent":[null]}}