Streamline directory layout and consolidate state and cache paths

This commit is contained in:
gitea committed 2026-10-12 15:58:28 +08:00
1 parent 9cf3e8ce56
commit d3642b93d8
13 files changed
+94 -29

No files matched your search

+9 -2
View File
@@ -2,5 +2,12 @@ import { homedir } from "node:os";
import { join } from "node:path";
export const SEAL_CONFIG_DIR = join(homedir(), ".config", "seal-use");
export const PRIMARY_LINTERS_DIR = join(SEAL_CONFIG_DIR, "linters");
export const OFFICIAL_LINTERS_DIR = join(PRIMARY_LINTERS_DIR, "official");
export const SEAL_STATE_DIR = join(SEAL_CONFIG_DIR, "state");
export const SEAL_CACHE_DIR = join(homedir(), ".cache", "seal-use");
/** 用户全局自定义校验器存放目录(属于用户资产,保留在 ~/.config/,防止随缓存被误删) */
export const USER_LINTERS_DIR = join(SEAL_CONFIG_DIR, "linters");
export const PRIMARY_LINTERS_DIR = USER_LINTERS_DIR;
/** 官方明文下发校验器目录(由 CLI 自动同步与重写,属于只读缓存,归位于 ~/.cache/) */
export const OFFICIAL_LINTERS_DIR = join(SEAL_CACHE_DIR, "linters", "official");