diff --git a/js/.gitignore b/js/.gitignore index 2e56bfb3e..ccf7d9ef2 100644 --- a/js/.gitignore +++ b/js/.gitignore @@ -11,3 +11,5 @@ braintrust-*.tgz # Vendor libraries (local-only for development) vendor/ + +playground.ts diff --git a/js/package.json b/js/package.json index 96ca6635d..658280c5e 100644 --- a/js/package.json +++ b/js/package.json @@ -127,7 +127,8 @@ "test:vitest": "pnpm --filter @braintrust/vitest-wrapper-tests test", "test:output": "tsx scripts/test-output.ts --with-comparison --with-metrics --with-progress", "lint": "eslint .", - "fix:eslint": "eslint --fix ." + "fix:eslint": "eslint --fix .", + "playground": "tsx playground.ts" }, "author": "", "license": "MIT", diff --git a/js/tsconfig.json b/js/tsconfig.json index bdfdf2f12..24b85b11b 100644 --- a/js/tsconfig.json +++ b/js/tsconfig.json @@ -25,6 +25,7 @@ "src/auto-instrumentations/configs/**", "src/auto-instrumentations/loader/**", "src/auto-instrumentations/index.ts", - "tests/auto-instrumentations/**" + "tests/auto-instrumentations/**", + "./playground.ts" ] } diff --git a/package.json b/package.json index 8d559cd99..3fb8028bb 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "start": "turbo run start", "clean": "turbo run clean", "test": "dotenv -e .env -- turbo run test --filter=\"!@braintrust/otel\"", + "playground": "dotenv -e .env -- turbo run playground --filter=\"braintrust\"", "prepare": "husky || true", "lint:prettier": "prettier --check .", "lint:eslint": "turbo run lint", diff --git a/turbo.json b/turbo.json index 914c62a57..8e7b38b02 100644 --- a/turbo.json +++ b/turbo.json @@ -27,6 +27,15 @@ "clean": { "cache": false }, - "watch": {} + "watch": {}, + "playground": { + "cache": false, + "passThroughEnv": [ + "ANTHROPIC_API_KEY", + "BRAINTRUST_API_KEY", + "OPENAI_API_KEY" + ], + "dependsOn": ["^build", "build"] + } } }