(basePath: string)
| 329 | try { |
| 330 | const moduleMod = await import("node:module"); |
| 331 | const addFromRequire = (basePath: string) => { |
| 332 | try { |
| 333 | const req = moduleMod.createRequire(basePath); |
| 334 | const resolved = req.resolve("@opencode-ai/sdk"); |
| 335 | addCandidate(urlMod.pathToFileURL(resolved).href); |
| 336 | } catch { |
| 337 | // Try next base path. |
| 338 | } |
| 339 | }; |
| 340 | addFromRequire(pathMod.join(process.cwd(), "package.json")); |
| 341 | if (pluginFsPath) { |
| 342 | addFromRequire(pluginFsPath); |
no test coverage detected