{"path":"lib/init.js","size":1183,"locked":false,"binary":false,"truncated":false,"content":"import { detectFramework } from './detect.js';\nimport { writeConfig } from './config.js';\n\nexport async function runInit() {\n  const cwd = process.cwd();\n\n  console.log('🔍 Detecting your project...');\n  const detected = detectFramework(cwd);\n\n  const config = {\n    framework: detected.framework,\n    buildCommand: detected.buildCommand,\n    outputDir: detected.outputDir,\n    // Optional — add the .sol domain you own (no \".sol\" suffix) once you\n    // have one, e.g. \"myproject\". Leave blank to just build + pin to IPFS\n    // without a domain write; add this later and re-deploy to go live at\n    // yourdomain.sol.\n    domain: '',\n    // Pinning provider: \"storacha\" (default) or \"filebase\" as a fallback —\n    // see README.md's \"Alternate pinning provider\" section\n    provider: 'storacha'\n  };\n\n  const path = writeConfig(cwd, config);\n\n  console.log(`✅ Detected: ${detected.framework}`);\n  if (detected.note) console.log(`⚠️  ${detected.note}`);\n  console.log(`✅ Wrote config to ${path}`);\n  console.log(\n    '\\nNext: run `anchr deploy` to build + pin to IPFS. Add a \"domain\" in ' +\n    'anchr.json once you own a .sol domain to also resolve it there.'\n  );\n}\n"}