#!/usr/bin/env node "use strict"; function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkLYI5DEVZcjs = require('../chunk-LYI5DEVZ.cjs');var _chunkEVDY7FB4cjs = require('../chunk-EVDY7FB4.cjs');var _chunkQS6T7DCVcjs = require('../chunk-QS6T7DCV.cjs');require('../chunk-PHWSETKC.cjs');require('../chunk-QX2UXNCU.cjs');var _stdiojs = require('@modelcontextprotocol/sdk/server/stdio.js');var _util = require('util');function p(r,o=","){return r.split(o).map(e=>e.trim()).filter(e=>e!=="")}var{version:d}=_chunkQS6T7DCVcjs.a;async function g(){let{values:{["access-token"]:r,["project-ref"]:o,["read-only"]:t,["api-url"]:e,["version"]:l,["features"]:s}}=_util.parseArgs.call(void 0, {options:{"access-token":{type:"string"},"project-ref":{type:"string"},"read-only":{type:"boolean",default:!1},"api-url":{type:"string"},version:{type:"boolean"},features:{type:"string"}}});l&&(console.log(d),process.exit(0));let n=_nullishCoalesce(r, () => (process.env.SUPABASE_ACCESS_TOKEN));n||(console.error("Please provide a personal access token (PAT) with the --access-token flag or set the SUPABASE_ACCESS_TOKEN environment variable"),process.exit(1));let f=s?p(s):void 0,m=_chunkEVDY7FB4cjs.a.call(void 0, {accessToken:n,apiUrl:e}),u=_chunkLYI5DEVZcjs.j.call(void 0, {platform:m,projectId:o,readOnly:t,features:f}),S=new _stdiojs.StdioServerTransport;await u.connect(S)}g().catch(console.error); //# sourceMappingURL=stdio.cjs.map