Files
jackwener 59c0d639a5 refactor: fix 9 issues from round 2 code review
Bug fixes:
- #1 /logs?level=error returned 404 — use pathname for route matching
- #2 Duplicate initialization — added 'initialized' guard flag

Should fix:
- #4 Added screenshot() to IPage interface
- #5 Graceful shutdown rejects pending requests before exit
- #6 Use process.execPath instead of 'npx tsx' for faster daemon spawn

Cleanup:
- #7 Removed duplicate 'browser' keyword in package.json
- #8 Removed unused normalizeEvaluateSource import from browser.ts
- #9 Changed dynamic import to static import in intercept.ts
- #10 Added explicit throw at end of sendCommand for clarity

61 tests pass (4 test files). Extension: 10.55KB.
2026-03-19 16:36:06 +08:00

59 lines
1.4 KiB
JSON

{
"name": "@jackwener/opencli",
"version": "0.9.8",
"publishConfig": {
"access": "public"
},
"description": "Make any website your CLI. AI-powered.",
"engines": {
"node": ">=20.0.0"
},
"type": "module",
"main": "dist/main.js",
"bin": {
"opencli": "dist/main.js"
},
"scripts": {
"dev": "tsx src/main.ts",
"build": "tsc && npm run clean-yaml && npm run copy-yaml && npm run build-manifest",
"build-manifest": "node dist/build-manifest.js",
"clean-yaml": "node scripts/clean-yaml.cjs",
"copy-yaml": "node scripts/copy-yaml.cjs",
"start": "node dist/main.js",
"postinstall": "node scripts/postinstall.js || true",
"typecheck": "tsc --noEmit",
"lint": "tsc --noEmit",
"prepublishOnly": "npm run build",
"test": "vitest run",
"test:site": "node scripts/test-site.mjs",
"test:watch": "vitest"
},
"keywords": [
"cli",
"browser",
"web",
"ai"
],
"author": "jackwener",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "git+https://github.com/jackwener/opencli.git"
},
"dependencies": {
"chalk": "^5.3.0",
"cli-table3": "^0.6.5",
"commander": "^14.0.3",
"js-yaml": "^4.1.0",
"ws": "^8.18.0"
},
"devDependencies": {
"@types/js-yaml": "^4.0.9",
"@types/ws": "^8.5.13",
"@types/node": "^22.13.10",
"tsx": "^4.19.3",
"typescript": "^5.8.2",
"vitest": "^4.1.0"
}
}