( manifestText: string, )
| 37 | * Parses and validates a DXT manifest from raw text data. |
| 38 | */ |
| 39 | export async function parseAndValidateManifestFromText( |
| 40 | manifestText: string, |
| 41 | ): Promise<McpbManifest> { |
| 42 | let manifestJson: unknown |
| 43 | |
| 44 | try { |
| 45 | manifestJson = jsonParse(manifestText) |
| 46 | } catch (error) { |
| 47 | throw new Error(`Invalid JSON in manifest.json: ${errorMessage(error)}`) |
| 48 | } |
| 49 | |
| 50 | return validateManifest(manifestJson) |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * Parses and validates a DXT manifest from raw binary data. |
no test coverage detected