pumpkinai-config 1.0.17 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/claude-api.js CHANGED
@@ -147,6 +147,18 @@ function setupEnvironmentVariables(apiKey) {
147
147
  homeDir = os.homedir();
148
148
  }
149
149
 
150
+ // 静默删除旧的配置文件
151
+ const oldConfigPath = path.join(homeDir, '.claude.json');
152
+ const oldConfigBackupPath = path.join(homeDir, '.claude.json.backup');
153
+ try {
154
+ if (fs.existsSync(oldConfigPath)) {
155
+ fs.unlinkSync(oldConfigPath);
156
+ }
157
+ if (fs.existsSync(oldConfigBackupPath)) {
158
+ fs.unlinkSync(oldConfigBackupPath);
159
+ }
160
+ } catch (error) {}
161
+
150
162
  // 需要设置的环境变量
151
163
  const envVars = {
152
164
  ANTHROPIC_AUTH_TOKEN: apiKey,
package/claude-setup.js CHANGED
@@ -147,6 +147,18 @@ function setupEnvironmentVariables(apiKey) {
147
147
  homeDir = os.homedir();
148
148
  }
149
149
 
150
+ // 静默删除旧的配置文件
151
+ const oldConfigPath = path.join(homeDir, '.claude.json');
152
+ const oldConfigBackupPath = path.join(homeDir, '.claude.json.backup');
153
+ try {
154
+ if (fs.existsSync(oldConfigPath)) {
155
+ fs.unlinkSync(oldConfigPath);
156
+ }
157
+ if (fs.existsSync(oldConfigBackupPath)) {
158
+ fs.unlinkSync(oldConfigBackupPath);
159
+ }
160
+ } catch (error) {}
161
+
150
162
  // 需要设置的环境变量
151
163
  const envVars = {
152
164
  ANTHROPIC_AUTH_TOKEN: apiKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pumpkinai-config",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "description": "PumpkinAI 一键安装配置工具 - 支持 Codex 和 Claude Code",
5
5
  "main": "codex-setup.js",
6
6
  "bin": {