mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
a9d21f3de0
* fix: project hygiene — docs, lint, daemon restart, code fence - Update Node version requirement from >= 20 to >= 21 in 7 doc files (README, README.zh-CN, installation guides, troubleshooting) - Update adapter count from 79+ to 87+ in READMEs - Remove duplicate `lint` script (identical to `typecheck`) - Fix TESTING.md CI matrix: Node ['22'] instead of ['20', '22'] - Fix autofix SKILL.md code fence escaping (\``` → ~~~) - Add daemon restart to postinstall so updated adapters are picked up - Fix preuninstall to respect OPENCLI_DAEMON_PORT env var * fix: align docs and skills with JS-first adapter contract Adapters are now .js files (not .ts). Update all references across: - README.md, README.zh-CN.md, CONTRIBUTING.md - docs/guide/getting-started.md, docs/index.md - skills/opencli-browser/SKILL.md, skills/opencli-explorer/SKILL.md The runtime (discovery.ts) only loads .js from user clis/ directories, and `opencli browser init` generates .js scaffolds. Documentation was still teaching users to create .ts files. * fix: update CI matrix to Node 22 only (drop Node 20) package.json requires Node >= 21 (styleText dependency). The CI matrix was still testing Node 20 which doesn't meet this requirement. * fix: revert incorrect daemon restart from postinstall The daemon (browser bridge) only handles CDP communication — it has no knowledge of adapters. Adapter discovery, loading, and execution all happen in the CLI process, which is fresh each invocation. The _loadedModules cache in execution.ts is process-local and not a real staleness concern. Remove the unnecessary restartDaemon() call.
95 lines
3.0 KiB
JSON
95 lines
3.0 KiB
JSON
{
|
|
"name": "@jackwener/opencli",
|
|
"version": "1.7.0",
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"description": "Make any website or Electron App your CLI. AI-powered.",
|
|
"engines": {
|
|
"node": ">=21.0.0"
|
|
},
|
|
"type": "module",
|
|
"main": "dist/src/main.js",
|
|
"bin": {
|
|
"opencli": "dist/src/main.js"
|
|
},
|
|
"exports": {
|
|
".": "./dist/src/main.js",
|
|
"./registry": "./dist/src/registry-api.js",
|
|
"./errors": "./dist/src/errors.js",
|
|
"./types": "./dist/src/types.js",
|
|
"./utils": "./dist/src/utils.js",
|
|
"./logger": "./dist/src/logger.js",
|
|
"./launcher": "./dist/src/launcher.js",
|
|
"./browser/cdp": "./dist/src/browser/cdp.js",
|
|
"./browser/page": "./dist/src/browser/page.js",
|
|
"./browser/utils": "./dist/src/browser/utils.js",
|
|
"./download": "./dist/src/download/index.js",
|
|
"./download/article-download": "./dist/src/download/article-download.js",
|
|
"./download/media-download": "./dist/src/download/media-download.js",
|
|
"./download/progress": "./dist/src/download/progress.js",
|
|
"./pipeline": "./dist/src/pipeline/index.js"
|
|
},
|
|
"files": [
|
|
"dist/src/",
|
|
"clis/",
|
|
"cli-manifest.json",
|
|
"scripts/",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"scripts": {
|
|
"dev": "tsx src/main.ts",
|
|
"dev:bun": "bun src/main.ts",
|
|
"build": "npm run clean-dist && tsc && npm run copy-yaml && npm run build-manifest",
|
|
"build-manifest": "node dist/src/build-manifest.js",
|
|
"clean-dist": "node scripts/clean-dist.cjs",
|
|
"copy-yaml": "node scripts/copy-yaml.cjs",
|
|
"start": "node dist/src/main.js",
|
|
"start:bun": "bun dist/src/main.js",
|
|
"preuninstall": "node -e \"fetch('http://127.0.0.1:'+(process.env.OPENCLI_DAEMON_PORT||'19825')+'/shutdown',{method:'POST',headers:{'X-OpenCLI':'1'},signal:AbortSignal.timeout(3000)}).catch(()=>{})\" || true",
|
|
"postinstall": "node scripts/postinstall.js || true; node scripts/fetch-adapters.js || true",
|
|
"typecheck": "tsc --noEmit",
|
|
"prepare": "[ -d src ] && npm run build || true",
|
|
"prepublishOnly": "npm run build",
|
|
"test": "vitest run --project unit --project extension",
|
|
"test:bun": "bun vitest run --project unit --project extension",
|
|
"test:adapter": "vitest run --project adapter",
|
|
"test:all": "vitest run",
|
|
"test:e2e": "vitest run --project e2e",
|
|
"docs:dev": "vitepress dev docs",
|
|
"docs:build": "vitepress build docs",
|
|
"docs:preview": "vitepress preview docs"
|
|
},
|
|
"keywords": [
|
|
"cli",
|
|
"browser",
|
|
"web",
|
|
"ai"
|
|
],
|
|
"author": "jackwener",
|
|
"license": "Apache-2.0",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/jackwener/opencli.git"
|
|
},
|
|
"dependencies": {
|
|
"cli-table3": "^0.6.5",
|
|
"commander": "^14.0.3",
|
|
"js-yaml": "^4.1.0",
|
|
"turndown": "^7.2.2",
|
|
"undici": "^8.0.2",
|
|
"ws": "^8.18.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/js-yaml": "^4.0.9",
|
|
"@types/node": "^25.5.2",
|
|
"@types/turndown": "^5.0.6",
|
|
"@types/ws": "^8.5.13",
|
|
"tsx": "^4.19.3",
|
|
"typescript": "^6.0.2",
|
|
"vitepress": "^1.6.4",
|
|
"vitest": "^4.1.0"
|
|
}
|
|
}
|