chore: devDependencies 去硬编码 — @deepseek-ai/* 改从 npm 解析(^0.0.1-rc.1)
- package.json:14 条 link:/Users/menghuan/.dsh/source/current/... 绝对路径 改为 ^0.0.1-rc.1(npm registry 预发布版,官方已发布 0.0.1-rc.1); peerDependencies 同步 ^0.0.1-rc.1 以匹配 rc 系列 - 安装需安装者自己的只读令牌(~/.npmrc 配置 //registry.npmjs.org/:_authToken, 不写进仓库);或改回指向自己 ~/.dsh/source/current 的 link: —— README 三处说明更新 - .gitignore 加 .npmrc 防令牌误提交;token 全程仅环境变量/临时文件使用,已删除 - vitest.config.ts:npm 版 ui-primitives 的 lib 顶层 import katex css, node_modules 外部化会被 Node 原生加载撞上 .css —— inline 该包走 Vite 转换 stub - pnpm-lock.yaml 由 link: 仓库改为 registry tarball(+2001 行); pnpm-workspace.yaml 追加 minimumReleaseAgeExclude(pnpm 11 自动记账)
This commit is contained in:
@@ -145,3 +145,4 @@ lib/
|
|||||||
|
|
||||||
# plugin-registry install staging (assembled by scripts/package-registry.mjs)
|
# plugin-registry install staging (assembled by scripts/package-registry.mjs)
|
||||||
registry/
|
registry/
|
||||||
|
.npmrc
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
1. 克隆并构建:
|
1. 克隆并构建:
|
||||||
git clone https://github.com/dsh-external/DSH-better-sidebar.git ~/Code/DSH-better-sidebar
|
git clone https://github.com/dsh-external/DSH-better-sidebar.git ~/Code/DSH-better-sidebar
|
||||||
cd ~/Code/DSH-better-sidebar && pnpm install && pnpm build
|
cd ~/Code/DSH-better-sidebar && pnpm install && pnpm build
|
||||||
(若 pnpm install 因 @deepseek-ai/* 的 link: 依赖解析失败,说明 DSH 源码 checkout 不在 ~/.dsh/source/current —— 停下来告诉我,不要继续)
|
(@deepseek-ai/* 依赖从 npm 解析(0.0.1-rc.? 预发布版);若 pnpm install 401/404,说明 ~/.npmrc 没有可用的 @deepseek-ai 只读令牌 —— 用安装者自己的只读令牌配置,或把 devDependencies 改回指向自己 ~/.dsh/source/current 的 link:,不要继续)
|
||||||
2. 注册到 web profile:
|
2. 注册到 web profile:
|
||||||
a. 编辑 ~/.dsh/profiles/web/package.json,在 dependencies 中加入 "dsh-better-sidebar": "link:<第 1 步克隆目录的绝对路径>"
|
a. 编辑 ~/.dsh/profiles/web/package.json,在 dependencies 中加入 "dsh-better-sidebar": "link:<第 1 步克隆目录的绝对路径>"
|
||||||
b. 编辑 ~/.dsh/profiles/web/cordis.patch.yml,追加挂载行:
|
b. 编辑 ~/.dsh/profiles/web/cordis.patch.yml,追加挂载行:
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
1. 拉取最新代码并重新构建:
|
1. 拉取最新代码并重新构建:
|
||||||
cd ~/Code/DSH-better-sidebar && git pull && pnpm install && pnpm build
|
cd ~/Code/DSH-better-sidebar && git pull && pnpm install && pnpm build
|
||||||
(若 pnpm install 因 @deepseek-ai/* 的 link: 依赖解析失败,说明 DSH 源码 checkout 不在 ~/.dsh/source/current —— 停下来告诉我,不要继续)
|
(@deepseek-ai/* 依赖从 npm 解析(0.0.1-rc.? 预发布版);若 pnpm install 401/404,说明 ~/.npmrc 没有可用的 @deepseek-ai 只读令牌 —— 用安装者自己的只读令牌配置,或把 devDependencies 改回指向自己 ~/.dsh/source/current 的 link:,不要继续)
|
||||||
2. 核对注册仍然有效(缺失才需要补):
|
2. 核对注册仍然有效(缺失才需要补):
|
||||||
a. ~/.dsh/profiles/web/package.json 的 dependencies 中含 "dsh-better-sidebar": "link:<仓库目录的绝对路径>"
|
a. ~/.dsh/profiles/web/package.json 的 dependencies 中含 "dsh-better-sidebar": "link:<仓库目录的绝对路径>"
|
||||||
b. ~/.dsh/profiles/web/cordis.patch.yml 中含挂载行(id: better-sidebar, name: 'dsh-better-sidebar')
|
b. ~/.dsh/profiles/web/cordis.patch.yml 中含挂载行(id: better-sidebar, name: 'dsh-better-sidebar')
|
||||||
@@ -182,7 +182,10 @@ dsh registry enable dsh-external/dsh-better-sidebar
|
|||||||
### 前置条件
|
### 前置条件
|
||||||
|
|
||||||
- 已安装 DSH(`dsh web` 可运行),Node.js ≥ 20、pnpm ≥ 10
|
- 已安装 DSH(`dsh web` 可运行),Node.js ≥ 20、pnpm ≥ 10
|
||||||
- **构建/类型检查**需要 DSH 源码 checkout 位于 `~/.dsh/source/current`(`devDependencies` 中的 `@deepseek-ai/*` 以 `link:` 指向它;若 checkout 在其他路径,修改 `package.json` 中对应的 `link:` 路径)。**运行期不依赖该 checkout**——`@deepseek-ai/*` 声明在 `peerDependencies`,由 web profile 提供
|
- **构建/类型检查**的 `@deepseek-ai/*` 依赖默认从 npm registry 解析(`0.0.1-rc.?` 预发布版,`devDependencies` / `peerDependencies` 均声明为 `^0.0.1-rc.1`)——需要安装者**自己的只读令牌**:
|
||||||
|
- 在 `~/.npmrc`(用户级,**不要**写进仓库的 `.npmrc` / 提交到 Git)配置:`//registry.npmjs.org/:_authToken=<你自己的只读令牌>`
|
||||||
|
- 或改用本地源码 checkout:把 `devDependencies` 里的 `@deepseek-ai/*` 版本改回 `link:<你自己的 ~/.dsh/source/current 下对应包路径>`
|
||||||
|
- **运行期不依赖 npm 或该 checkout**——`@deepseek-ai/*` 声明在 `peerDependencies`,由 web profile 提供
|
||||||
|
|
||||||
### 1. 克隆、安装、构建
|
### 1. 克隆、安装、构建
|
||||||
|
|
||||||
|
|||||||
+28
-28
@@ -60,20 +60,20 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@deepseek-ai/dsh-agent": "^0.0.1",
|
"@deepseek-ai/dsh-agent": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-client-runtime": "^0.0.1",
|
"@deepseek-ai/dsh-client-runtime": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-client-schema-form": "^0.0.1",
|
"@deepseek-ai/dsh-client-schema-form": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-client-ui-conversation": "^0.0.1",
|
"@deepseek-ai/dsh-client-ui-conversation": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-client-ui-primitives": "^0.0.1",
|
"@deepseek-ai/dsh-client-ui-primitives": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-client-ui-settings": "^0.0.1",
|
"@deepseek-ai/dsh-client-ui-settings": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-client-ui-slots": "^0.0.1",
|
"@deepseek-ai/dsh-client-ui-slots": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-client-web-react": "^0.0.1",
|
"@deepseek-ai/dsh-client-web-react": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-host-webserver": "^0.0.1",
|
"@deepseek-ai/dsh-host-webserver": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-invariants": "^0.0.1",
|
"@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-llm": "^0.0.1",
|
"@deepseek-ai/dsh-llm": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-session": "^0.0.1",
|
"@deepseek-ai/dsh-session": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-settings": "^0.0.1",
|
"@deepseek-ai/dsh-settings": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-tools": "^0.0.1",
|
"@deepseek-ai/dsh-tools": "^0.0.1-rc.1",
|
||||||
"cordis": "^4.0.0-rc.7",
|
"cordis": "^4.0.0-rc.7",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0"
|
"react-dom": "^18.2.0"
|
||||||
@@ -114,20 +114,20 @@
|
|||||||
"xterm": "^5.3.0"
|
"xterm": "^5.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@deepseek-ai/dsh-agent": "link:/Users/menghuan/.dsh/source/current/packages/core/agent",
|
"@deepseek-ai/dsh-agent": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-client-runtime": "link:/Users/menghuan/.dsh/source/current/packages/client/runtime",
|
"@deepseek-ai/dsh-client-runtime": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-client-schema-form": "link:/Users/menghuan/.dsh/source/current/packages/client/schema-form",
|
"@deepseek-ai/dsh-client-schema-form": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-client-ui-conversation": "link:/Users/menghuan/.dsh/source/current/packages/client/ui-conversation",
|
"@deepseek-ai/dsh-client-ui-conversation": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-client-ui-primitives": "link:/Users/menghuan/.dsh/source/current/packages/client/ui-primitives",
|
"@deepseek-ai/dsh-client-ui-primitives": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-client-ui-settings": "link:/Users/menghuan/.dsh/source/current/packages/client/ui-settings",
|
"@deepseek-ai/dsh-client-ui-settings": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-client-ui-slots": "link:/Users/menghuan/.dsh/source/current/packages/client/ui-slots",
|
"@deepseek-ai/dsh-client-ui-slots": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-client-web-react": "link:/Users/menghuan/.dsh/source/current/packages/client/web-react",
|
"@deepseek-ai/dsh-client-web-react": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-host-webserver": "link:/Users/menghuan/.dsh/source/current/packages/host/webserver",
|
"@deepseek-ai/dsh-host-webserver": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-invariants": "link:/Users/menghuan/.dsh/source/current/packages/support/invariants",
|
"@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-llm": "link:/Users/menghuan/.dsh/source/current/packages/llm/llm",
|
"@deepseek-ai/dsh-llm": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-session": "link:/Users/menghuan/.dsh/source/current/packages/core/session",
|
"@deepseek-ai/dsh-session": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-settings": "link:/Users/menghuan/.dsh/source/current/packages/settings/settings",
|
"@deepseek-ai/dsh-settings": "^0.0.1-rc.1",
|
||||||
"@deepseek-ai/dsh-tools": "link:/Users/menghuan/.dsh/source/current/packages/core/tools",
|
"@deepseek-ai/dsh-tools": "^0.0.1-rc.1",
|
||||||
"@types/node": "^24.0.0",
|
"@types/node": "^24.0.0",
|
||||||
"@types/react": "~18.3.1",
|
"@types/react": "~18.3.1",
|
||||||
"@types/react-dom": "~18.3.1",
|
"@types/react-dom": "~18.3.1",
|
||||||
|
|||||||
Generated
+2001
-28
File diff suppressed because it is too large
Load Diff
@@ -7,3 +7,61 @@ packages:
|
|||||||
allowBuilds:
|
allowBuilds:
|
||||||
node-pty: true
|
node-pty: true
|
||||||
protobufjs: true
|
protobufjs: true
|
||||||
|
|
||||||
|
minimumReleaseAgeExclude:
|
||||||
|
- '@deepseek-ai/cordis-plugin-include@1.0.5-rc.1'
|
||||||
|
- '@deepseek-ai/cordis-plugin-loader@1.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/cordis@4.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/cosmokit@1.8.2-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-agent-default-model@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-agent-presets@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-agent@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-api-remotes@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-atomic-write@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-attachment@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-brand@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-client-connection@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-client-locale@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-client-runtime@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-client-schema-form@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-client-ui-conversation@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-client-ui-primitives@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-client-ui-settings@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-client-ui-slash@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-client-ui-slots@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-client-web-react@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-code-runtime@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-commands@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-compact@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-credentials@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-goal@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-host-apiproxy@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-host-directory-picker@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-host-webserver@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-invariants@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-llm-retry@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-llm@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-native-command@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-paths@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-scope@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-session-persistence@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-session-projection-cache@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-session-projection@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-session-query@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-session-title@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-session@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-settings@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-skill@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-storage-domain@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-storage@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-subagent@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-system-prompt@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-timeout@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-token-meter@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-tools@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-type-meta@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-typert-registry@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-user-approval@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-user-interaction@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/dsh-workspace@0.0.1-rc.1'
|
||||||
|
- '@deepseek-ai/schemastery@3.18.1-rc.1'
|
||||||
|
|||||||
+1
-1
@@ -16,5 +16,5 @@
|
|||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"types": ["node"]
|
"types": ["node"]
|
||||||
},
|
},
|
||||||
"include": ["src", "tests", "tsdown.config.ts"]
|
"include": ["src", "tests", "tsdown.config.ts", "vitest.config.ts"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* Vitest config: inline the npm-published `@deepseek-ai/*` packages whose
|
||||||
|
* BUILT lib bundles css side-effect imports (e.g. `dsh-client-ui-primitives`
|
||||||
|
* imports `katex/dist/katex.min.css` at the top of its `lib/index.js`).
|
||||||
|
*
|
||||||
|
* Installed from the npm registry (the default since v0.4.1) these packages
|
||||||
|
* live under `node_modules/.pnpm` and are externalized by vitest — Node then
|
||||||
|
* chokes on the `.css` import. Inlining routes them through Vite's transform,
|
||||||
|
* which stubs css imports (the default `css: false`). The previous
|
||||||
|
* `link:`-to-source-checkout install needed no such config: linked files sit
|
||||||
|
* outside `node_modules` and are transformed by default.
|
||||||
|
*/
|
||||||
|
import { defineConfig } from 'vitest/config'
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
test: {
|
||||||
|
server: {
|
||||||
|
deps: {
|
||||||
|
inline: [/@deepseek-ai\/dsh-client-ui-primitives/],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user