{"version":3,"file":"entry.cjs","names":[],"sources":["../../../src/codegen/entry.ts"],"sourcesContent":["import { VIRTUAL_MANIFEST_ID } from \"../constants.js\";\nimport { toPosixPath } from \"../support/paths.js\";\n\nexport type EmitVirtualEntryOptions = {\n  taserAppImportPath: string;\n  basePath?: string | undefined;\n  manifestImportPath?: string | undefined;\n};\n\nexport function emitVirtualEntrySource(options: EmitVirtualEntryOptions): string {\n  const manifestImportPath = toPosixPath(options.manifestImportPath ?? VIRTUAL_MANIFEST_ID);\n  const taserAppImportPath = toPosixPath(options.taserAppImportPath);\n  const configArg =\n    options.basePath && options.basePath !== \"/\" && options.basePath !== \"\"\n      ? `, { basePath: \"${options.basePath}\" }`\n      : \"\";\n\n  return [\n    `import taser from \"${taserAppImportPath}\";`,\n    `import { routeManifest } from \"${manifestImportPath}\";`,\n    \"\",\n    `export const app = taser.create(routeManifest${configArg});`,\n    \"export default app;\",\n    \"\",\n  ].join(\"\\n\");\n}\n"],"mappings":";;;AASA,SAAgB,uBAAuB,SAA0C;CAC/E,MAAM,qBAAqB,cAAA,YAAY,QAAQ,sBAAA,2BAAyC;CACxF,MAAM,qBAAqB,cAAA,YAAY,QAAQ,kBAAkB;CACjE,MAAM,YACJ,QAAQ,YAAY,QAAQ,aAAa,OAAO,QAAQ,aAAa,KACjE,kBAAkB,QAAQ,SAAS,OACnC;CAEN,OAAO;EACL,sBAAsB,mBAAmB;EACzC,kCAAkC,mBAAmB;EACrD;EACA,gDAAgD,UAAU;EAC1D;EACA;CACF,CAAC,CAAC,KAAK,IAAI;AACb"}