{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/init/frameworkSetup/index.ts"],"sourcesContent":["import { nextAppRouterAdapter } from './nextAppRouter';\nimport { tanStackStartAdapter } from './tanstackStart';\nimport type { FrameworkAdapter, FrameworkSetupContext } from './types';\n\nexport type { FrameworkAdapter, FrameworkSetupContext } from './types';\n\n/**\n * Registered framework adapters, tried in order. The first one whose `detect`\n * returns true handles the project. Add new adapters (Nuxt, Vite + React, …)\n * here as they are implemented.\n */\nconst adapters: FrameworkAdapter[] = [\n  nextAppRouterAdapter,\n  tanStackStartAdapter,\n];\n\n/**\n * Runs framework-specific scaffolding (middleware/proxy, providers in\n * layout/page, example content) for the first adapter that matches the project.\n * No-ops when no adapter recognizes the project. Each adapter is idempotent and\n * non-destructive, so this is safe to run on existing applications.\n */\nexport const setupFramework = async (\n  context: FrameworkSetupContext\n): Promise<void> => {\n  for (const adapter of adapters) {\n    if (await adapter.detect(context)) {\n      await adapter.setup(context);\n      return;\n    }\n  }\n};\n"],"mappings":";;;;;;;;;AAWA,MAAM,WAA+B,CACnC,sBACA,oBACF;;;;;;;AAQA,MAAa,iBAAiB,OAC5B,YACkB;CAClB,KAAK,MAAM,WAAW,UACpB,IAAI,MAAM,QAAQ,OAAO,OAAO,GAAG;EACjC,MAAM,QAAQ,MAAM,OAAO;EAC3B;CACF;AAEJ"}