Files
pi-provider-qoder/package.json
T
Simon Shi c83fa0b8f3 test: add unit tests and remove dead code
- Add vitest with 98 tests across 6 test files covering:
  - cosy.ts: URL builders, mode detection, model name mapping
  - thinking-parser.ts: ThinkingTagParser with all tag variants and chunked streaming
  - transform.ts: getContentText, transformTools, transformMessagesForQoder
  - pat.ts: isPatRefresh, encodePatRefresh/decodePatRefresh roundtrip
  - qoder-encoding.ts: custom encoding correctness and edge cases
  - models.ts: static model definitions integrity checks

- Remove dead code:
  - QODER_CN_DIRECT_BASE_URL (unused export in cosy.ts)
  - THINKING_START_TAG / THINKING_END_TAG (unused constants in thinking-parser.ts)

- Add test/test:watch scripts to package.json
2026-06-27 20:03:05 +08:00

54 lines
1.5 KiB
JSON

{
"name": "pi-provider-qoder",
"version": "0.2.2",
"description": "Pi extension for Qoder AI — with OAuth authentication, COSY signatures and WAF bypass",
"type": "module",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"keywords": [
"pi-package",
"pi",
"qoder",
"ai",
"provider"
],
"files": [
"dist",
"README.md"
],
"scripts": {
"build": "./node_modules/esbuild/bin/esbuild src/index.ts --bundle --platform=node --format=esm --outfile=dist/index.js --external:@earendil-works/pi-ai --external:@earendil-works/pi-coding-agent",
"check": "node node_modules/typescript/bin/tsc --noEmit",
"lint": "node node_modules/@biomejs/biome/bin/biome check .",
"lint:fix": "node node_modules/@biomejs/biome/bin/biome check --write .",
"format": "node node_modules/@biomejs/biome/bin/biome format --write .",
"test": "vitest run",
"test:watch": "vitest",
"prepare": "npm run build",
"prepublishOnly": "npm run check && npm run build"
},
"pi": {
"extensions": [
"./dist/index.js"
]
},
"devDependencies": {
"@biomejs/biome": "2.4.2",
"@earendil-works/pi-ai": "^0.80.2",
"@earendil-works/pi-coding-agent": "^0.80.2",
"esbuild": "^0.28.1",
"typescript": "^5.7.0",
"vitest": "^4.1.9"
},
"repository": {
"type": "git",
"url": "git+https://github.com/simonsmh/pi-provider-qoder.git"
},
"bugs": {
"url": "https://github.com/simonsmh/pi-provider-qoder/issues"
},
"homepage": "https://github.com/simonsmh/pi-provider-qoder#readme"
}