Files
lobehub__lobehub/apps/cli/package.json
Innei 6b608fa53e 🐛 fix(cli): declare url-join and vitest so the standalone install builds (#19408)
* 🐛 fix(cli): declare url-join and vitest so the standalone install builds

`apps/cli` installs against its own workspace, but `src/utils/agentStream.ts`
imports `url-join` and the tests import `vitest` while neither is declared
there — both resolve only through the root install's hoisting. CI does the root
install first, so this stayed invisible until someone builds the CLI on its own:

  Could not resolve 'url-join' in src/utils/agentStream.ts

`src/runtime/*` also imports `@lobechat/agent-runtime` and
`@lobechat/conversation-flow` undeclared, and those are deliberately left alone:
registering them pulls their workspace closure — 16 more packages including
`@lobechat/database` and a dozen builtin tools — into an install kept slim on
purpose. Declaring them properly is a bigger decision than this fix.

Verified by removing node_modules and running `pnpm install` + `bun run build`
inside `apps/cli` with no root install.

Claude-Session: https://claude.ai/code/session_01558yVdNvoxocvnWAs11DGT

* 🔒 chore(desktop): sync lockfile with the CLI dependency declarations

apps/desktop lists ../cli as a workspace member and keeps a lockfile, so
declaring url-join and vitest in apps/cli left it outdated and failed
Test Desktop App with ERR_PNPM_OUTDATED_LOCKFILE.

Claude-Session: https://claude.ai/code/session_01558yVdNvoxocvnWAs11DGT
2026-09-11 02:49:25 +08:00

75 lines
2.1 KiB
JSON

{
"name": "@lobehub/cli",
"version": "0.0.53",
"type": "module",
"bin": {
"lh": "./dist/index.js",
"lobe": "./dist/index.js",
"lobehub": "./dist/index.js"
},
"man": [
"./man/man1/lh.1",
"./man/man1/lobe.1",
"./man/man1/lobehub.1"
],
"files": [
"dist",
"man"
],
"scripts": {
"build": "bun scripts/ensureWorkspaceLinks.ts && tsdown",
"cli:link": "bun link",
"cli:unlink": "bun unlink",
"dev": "LOBEHUB_CLI_HOME=.lobehub-dev bun src/index.ts",
"man:generate": "bun src/man/generate.ts",
"prepublishOnly": "npm run build && npm run man:generate",
"test": "bunx vitest run --config vitest.config.mts --silent='passed-only'",
"test:coverage": "bunx vitest run --config vitest.config.mts --coverage",
"type-check": "tsc --noEmit"
},
"dependencies": {
"ws": "^8.21.0"
},
"devDependencies": {
"@lobechat/agent-gateway-client": "workspace:*",
"@lobechat/agent-tracing": "workspace:*",
"@lobechat/const": "workspace:*",
"@lobechat/device-control": "workspace:*",
"@lobechat/device-gateway-client": "workspace:*",
"@lobechat/device-identity": "workspace:*",
"@lobechat/eval-rubric": "workspace:*",
"@lobechat/heterogeneous-agents": "workspace:*",
"@lobechat/html-artifact": "workspace:*",
"@lobechat/local-file-shell": "workspace:*",
"@lobechat/tool-runtime": "workspace:*",
"@lobechat/types": "workspace:*",
"@lobechat/utils": "workspace:*",
"@trpc/client": "^11.18.0",
"@types/node": "^24.13.2",
"@types/semver": "^7.7.1",
"@types/ws": "^8.18.1",
"commander": "^13.1.0",
"dayjs": "^1.11.21",
"debug": "^4.4.3",
"diff": "^8.0.4",
"fast-glob": "^3.3.3",
"ignore": "^7.0.5",
"picocolors": "^1.1.1",
"semver": "^7.8.5",
"superjson": "^2.2.6",
"tinyexec": "^1.3.0",
"tree-kill": "^1.2.2",
"tsdown": "^0.21.10",
"typescript": "^6.0.3",
"url-join": "^5.0.0",
"vitest": "5.0.0"
},
"engines": {
"node": ">=22.15"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
}
}