refactor: 客户端目录统一添加 kenaito-conf- 前缀

- go-client → kenaito-conf-go-client
- python-client → kenaito-conf-python-client
- python-client-demo → kenaito-conf-python-client-demo
- nodejs-client → kenaito-conf-nodejs-client
- nodejs-client-demo → kenaito-conf-nodejs-client-demo
- 更新所有 README 和 package.json 中的路径引用
This commit is contained in:
2026-02-26 21:13:49 +08:00
parent 710659350d
commit 03a95abb4b
30 changed files with 14 additions and 14 deletions
+25
View File
@@ -0,0 +1,25 @@
import fs from 'node:fs';
import path from 'node:path';
const CACHE_FILE = 'config-cache.json';
export class Cache {
constructor(cacheDir = '.') {
this.cacheDir = cacheDir;
}
write(data) {
const filePath = path.join(this.cacheDir, CACHE_FILE);
fs.writeFileSync(filePath, JSON.stringify(data, null, 2), 'utf8');
}
read() {
const filePath = path.join(this.cacheDir, CACHE_FILE);
try {
const content = fs.readFileSync(filePath, 'utf8');
return JSON.parse(content);
} catch {
return null;
}
}
}