// src/root.ts
import path from "path";
import { fileURLToPath } from "url";
var filename = fileURLToPath(import.meta.url);
var karinDir = Object.freeze(path.join(filename, "../..").replace(/\\/g, "/"));
var karinMain = Object.freeze(path.join(karinDir, "dist", "index.js"));
var pluginDir = Object.freeze(path.join(process.cwd(), "plugins"));
var isPkg = Object.freeze(filename.includes("node_modules"));
var defaultConfigPath = Object.freeze(path.join(karinDir, "default", "config"));
var defaultViewPath = Object.freeze(path.join(karinDir, "default", "view"));
var commentPath = Object.freeze(path.join(karinDir, "default", "comment"));
var basePath = Object.freeze(path.join(process.cwd(), "@karinjs"));
var configPath = Object.freeze(path.join(basePath, "config"));
var dataPath = Object.freeze(path.join(basePath, "data"));
var tempPath = Object.freeze(path.join(basePath, "temp"));
var resourcePath = Object.freeze(path.join(basePath, "resource"));
var dbPath = Object.freeze(path.join(dataPath, "db"));
var levelPath = Object.freeze(path.join(dbPath, "level"));
var redisLevelPath = Object.freeze(path.join(dbPath, "redis-level"));
var sandboxLevelPath = Object.freeze(path.join(dbPath, "sandbox"));
var logsPath = Object.freeze(path.join(basePath, "logs"));
var htmlPath = Object.freeze(path.join(tempPath, "html"));
var pm2Path = Object.freeze(path.join(configPath, "pm2.yaml"));
var consolePath = Object.freeze(path.join(tempPath, "console"));
var sandboxDataPath = Object.freeze(path.join(dataPath, "sandbox"));
var sandboxTempPath = Object.freeze(path.join(tempPath, "sandbox"));
var root_default = {
  karinDir,
  karinMain,
  pluginDir,
  isPkg,
  defaultConfigPath,
  defaultViewPath,
  commentPath,
  basePath,
  configPath,
  dataPath,
  tempPath,
  resourcePath,
  dbPath,
  levelPath,
  redisLevelPath,
  sandboxLevelPath,
  logsPath,
  htmlPath,
  pm2Path,
  consolePath,
  sandboxDataPath,
  sandboxTempPath
};
export {
  basePath,
  commentPath,
  configPath,
  consolePath,
  dataPath,
  dbPath,
  root_default as default,
  defaultConfigPath,
  defaultViewPath,
  htmlPath,
  isPkg,
  karinDir,
  karinMain,
  levelPath,
  logsPath,
  pluginDir,
  pm2Path,
  redisLevelPath,
  resourcePath,
  sandboxDataPath,
  sandboxLevelPath,
  sandboxTempPath,
  tempPath
};
