mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-15 17:46:10 +02:00
fix: stabilize opencode declarations across package managers
This commit is contained in:
parent
0f4f95b3de
commit
05acc27530
8 changed files with 31 additions and 15 deletions
|
|
@ -5,11 +5,11 @@
|
|||
* Automatically detects the package manager and test framework.
|
||||
*/
|
||||
|
||||
import { tool } from "@opencode-ai/plugin/tool"
|
||||
import { tool, type ToolDefinition } from "@opencode-ai/plugin/tool"
|
||||
import * as path from "path"
|
||||
import * as fs from "fs"
|
||||
|
||||
export default tool({
|
||||
const runTestsTool: ToolDefinition = tool({
|
||||
description:
|
||||
"Run the test suite with optional coverage, watch mode, or specific test patterns. Automatically detects package manager (npm, pnpm, yarn, bun) and test framework.",
|
||||
args: {
|
||||
|
|
@ -97,6 +97,8 @@ export default tool({
|
|||
},
|
||||
})
|
||||
|
||||
export default runTestsTool
|
||||
|
||||
async function detectPackageManager(cwd: string): Promise<string> {
|
||||
const lockFiles: Record<string, string> = {
|
||||
"bun.lockb": "bun",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue