/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/pg-server-9.4-osx-x64@9.4.4/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
var fs=require("fs"),path=require("path"),spawnSync=require("spawn-sync"),spawn=require("child_process").spawn,extend=require("extend"),defaultConfig={port:5432};module.exports=function(e,r){var n=extend(defaultConfig,r||{});try{var t=fs.statSync(e)}catch(r){spawnSync(path.join(__dirname,"server/bin/initdb"),["-D",e,"--pwfile="+path.join(__dirname,"defaultpw")])}if(t&&!t.isDirectory())throw new Error("DATA_DIRECTORY_UNAVAILABLE");var i=Object.keys(n).map((function(e){return null===n[e]?"":e+" = "+n[e]})).join("\n");return fs.writeFileSync(path.join(e,"postgresql.conf"),i),spawn(path.join(__dirname,"server/bin/postgres"),["-D",e])},module.exports.pkgdir=function(){return __dirname};
//# sourceMappingURL=/sm/12935615474751a7199fc4a49274ccc044ecc770ced0594db96f21cbbcc2a811.map