(extension: string | undefined)
| 53 | } |
| 54 | |
| 55 | function resolveExtensionPath(extension: string | undefined): string { |
| 56 | const resolved = path.resolve(extension || getDefaultExtensionPath(__dirname)) |
| 57 | |
| 58 | if (!fs.existsSync(path.join(resolved, "extension.js"))) { |
| 59 | throw new Error(`Extension bundle not found at: ${resolved}`) |
| 60 | } |
| 61 | |
| 62 | return resolved |
| 63 | } |
| 64 | |
| 65 | function outputJson(data: unknown): void { |
| 66 | process.stdout.write(JSON.stringify(data, null, 2) + "\n") |
no test coverage detected