import {
  defineConfig
} from "./chunk-4JLFKGOK.js";

// stubs/main.ts
var stubsRoot = import.meta.dirname;

// configure.ts
async function configure(command) {
  const codemods = await command.createCodemods();
  await codemods.makeUsingStub(stubsRoot, "config/cors.stub", {});
  await codemods.registerMiddleware("server", [
    {
      path: "@adonisjs/cors/cors_middleware"
    }
  ]);
  await codemods.updateRcFile((rcFile) => {
    rcFile.addProvider("@adonisjs/cors/cors_provider");
  });
}
export {
  configure,
  defineConfig,
  stubsRoot
};
