@wengine-ai/claude-code-router-shared 2.0.26 → 2.3.235

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.
@@ -1,30 +0,0 @@
1
- /**
2
- * Read preset configuration file
3
- * Used by CLI to quickly read preset configuration
4
- */
5
-
6
- import * as fs from 'fs/promises';
7
- import * as path from 'path';
8
- import JSON5 from 'json5';
9
- import { getPresetDir } from './install';
10
-
11
- /**
12
- * Read preset configuration file
13
- * @param name Preset name
14
- * @returns Preset configuration object, or null if file does not exist
15
- */
16
- export async function readPresetFile(name: string): Promise<any | null> {
17
- try {
18
- const presetDir = getPresetDir(name);
19
- const manifestPath = path.join(presetDir, 'manifest.json');
20
- const manifest = JSON5.parse(await fs.readFile(manifestPath, 'utf-8'));
21
- // manifest is already a flat structure, return directly
22
- return manifest;
23
- } catch (error: any) {
24
- if (error.code === 'ENOENT') {
25
- return null;
26
- }
27
- console.error(`Failed to read preset file: ${error.message}`);
28
- return null;
29
- }
30
- }