dshmarket 1.20.1 → 1.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/pnpm-compat.js +22 -0
- package/lib/types/pnpm-compat.d.ts +1 -1
- package/package.json +1 -1
- package/src/pnpm-compat.ts +23 -1
package/lib/pnpm-compat.js
CHANGED
|
@@ -105,6 +105,28 @@ export function classifyPnpmFailure(output) {
|
|
|
105
105
|
message: `这个 profile 的 node_modules 链接到的 pnpm store,和当前 pnpm 默认使用的 store 不是同一个,pnpm 因此拒绝所有安装与卸载。${detail}\n在 profile 目录里执行一次 \`pnpm install --store-dir <上面第一个路径>\` 重新链接即可(dsh 运行时可能占用文件,必要时先退出 dsh)/ this profile's node_modules is linked to a different pnpm store than the one pnpm now resolves, so pnpm refuses every install and uninstall.${detail}\nRelink by running \`pnpm install --store-dir <the first path above>\` once in the profile directory (stop dsh first if files are locked)`,
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
+
// #222 by @MicroMilo: a patch in the profile that no longer applies.
|
|
109
|
+
//
|
|
110
|
+
// pnpm exits 1 (verified against 10.29.3) but it has ALREADY written the
|
|
111
|
+
// package — unpatched. So the profile is left holding the pristine version
|
|
112
|
+
// the patch existed to fix, and the damage shows up at the next boot as
|
|
113
|
+
// "failed to load plugins" rather than here, where it happened.
|
|
114
|
+
//
|
|
115
|
+
// Almost always the package moved the file the patch names: the reported
|
|
116
|
+
// case patched `client/client.js` in a package that had started shipping
|
|
117
|
+
// `lib/client.js`. That is not something the market can repair — the patch
|
|
118
|
+
// is the user's, and guessing a new target would be inventing a change
|
|
119
|
+
// they did not write — so it says exactly what is wrong and where.
|
|
120
|
+
if (output.includes('ERR_PNPM_PATCH_FAILED')) {
|
|
121
|
+
const patch = /Could not apply patch (\S+)/.exec(output)?.[1];
|
|
122
|
+
const which = patch === undefined ? '' : `(${patch})`;
|
|
123
|
+
const whichEn = patch === undefined ? '' : ` (${patch})`;
|
|
124
|
+
return {
|
|
125
|
+
code: 'patch-failed',
|
|
126
|
+
recoverable: false,
|
|
127
|
+
message: `profile 里的一个 pnpm 补丁打不上了${which}。pnpm 会继续把这个包装上,但装的是没打补丁的原版——通常下次启动才会以「插件加载失败」暴露出来。多半是包升级后挪动了补丁指向的文件(例如补丁改的是 client/client.js,而新版本发的是 lib/client.js)。请更新或删掉这个补丁文件,以及 profile package.json 里 pnpm.patchedDependencies 中对应的那一条 / a pnpm patch in this profile no longer applies${whichEn}. pnpm still installs the package, but unpatched — which usually surfaces at the next boot as "failed to load plugins" rather than here. The usual cause is the package moving the file the patch targets (for example a patch against client/client.js when the release now ships lib/client.js). Update or remove that patch file and its entry under pnpm.patchedDependencies in the profile's package.json`,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
108
130
|
if (output.includes('ERR_PNPM_ADDING_TO_ROOT')) {
|
|
109
131
|
return {
|
|
110
132
|
code: 'adding-to-root',
|
|
@@ -32,7 +32,7 @@ export declare function pluginArgsFor(profileDir: string, pluginArgs: string[]):
|
|
|
32
32
|
*/
|
|
33
33
|
export declare const HOST_NAMESPACE_RE: RegExp;
|
|
34
34
|
export interface PnpmFailure {
|
|
35
|
-
code: 'adding-to-root' | 'not-a-workspace' | 'hoist-pattern-diff' | 'pnpm-missing' | 'release-age-violation' | 'ignored-builds' | 'git-prepare-not-allowed' | 'fetch-404' | 'transient-network' | 'fetch-timeout' | 'unexpected-store';
|
|
35
|
+
code: 'adding-to-root' | 'not-a-workspace' | 'hoist-pattern-diff' | 'pnpm-missing' | 'release-age-violation' | 'ignored-builds' | 'git-prepare-not-allowed' | 'fetch-404' | 'transient-network' | 'fetch-timeout' | 'unexpected-store' | 'patch-failed';
|
|
36
36
|
/** Bilingual, actionable message shown to the user instead of the raw wall of text. */
|
|
37
37
|
message: string;
|
|
38
38
|
/** True when re-running `pnpm install` in the profile is the documented recovery. */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dshmarket",
|
|
3
3
|
"description": "Visual plugin market inside DeepSeek Harness — browse, search, and one-click install community plugins. · DSH 可视化插件市场:逛一逛,点一下,装好。",
|
|
4
|
-
"version": "1.20.
|
|
4
|
+
"version": "1.20.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/types/index.d.ts",
|
package/src/pnpm-compat.ts
CHANGED
|
@@ -45,7 +45,7 @@ export const HOST_NAMESPACE_RE = /^@deepseek-ai\//
|
|
|
45
45
|
export interface PnpmFailure {
|
|
46
46
|
code: 'adding-to-root' | 'not-a-workspace' | 'hoist-pattern-diff' | 'pnpm-missing' | 'release-age-violation'
|
|
47
47
|
| 'ignored-builds' | 'git-prepare-not-allowed' | 'fetch-404' | 'transient-network' | 'fetch-timeout'
|
|
48
|
-
| 'unexpected-store'
|
|
48
|
+
| 'unexpected-store' | 'patch-failed'
|
|
49
49
|
/** Bilingual, actionable message shown to the user instead of the raw wall of text. */
|
|
50
50
|
message: string
|
|
51
51
|
/** True when re-running `pnpm install` in the profile is the documented recovery. */
|
|
@@ -131,6 +131,28 @@ export function classifyPnpmFailure(output: string): PnpmFailure | null {
|
|
|
131
131
|
message: `这个 profile 的 node_modules 链接到的 pnpm store,和当前 pnpm 默认使用的 store 不是同一个,pnpm 因此拒绝所有安装与卸载。${detail}\n在 profile 目录里执行一次 \`pnpm install --store-dir <上面第一个路径>\` 重新链接即可(dsh 运行时可能占用文件,必要时先退出 dsh)/ this profile's node_modules is linked to a different pnpm store than the one pnpm now resolves, so pnpm refuses every install and uninstall.${detail}\nRelink by running \`pnpm install --store-dir <the first path above>\` once in the profile directory (stop dsh first if files are locked)`,
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
+
// #222 by @MicroMilo: a patch in the profile that no longer applies.
|
|
135
|
+
//
|
|
136
|
+
// pnpm exits 1 (verified against 10.29.3) but it has ALREADY written the
|
|
137
|
+
// package — unpatched. So the profile is left holding the pristine version
|
|
138
|
+
// the patch existed to fix, and the damage shows up at the next boot as
|
|
139
|
+
// "failed to load plugins" rather than here, where it happened.
|
|
140
|
+
//
|
|
141
|
+
// Almost always the package moved the file the patch names: the reported
|
|
142
|
+
// case patched `client/client.js` in a package that had started shipping
|
|
143
|
+
// `lib/client.js`. That is not something the market can repair — the patch
|
|
144
|
+
// is the user's, and guessing a new target would be inventing a change
|
|
145
|
+
// they did not write — so it says exactly what is wrong and where.
|
|
146
|
+
if (output.includes('ERR_PNPM_PATCH_FAILED')) {
|
|
147
|
+
const patch = /Could not apply patch (\S+)/.exec(output)?.[1]
|
|
148
|
+
const which = patch === undefined ? '' : `(${patch})`
|
|
149
|
+
const whichEn = patch === undefined ? '' : ` (${patch})`
|
|
150
|
+
return {
|
|
151
|
+
code: 'patch-failed',
|
|
152
|
+
recoverable: false,
|
|
153
|
+
message: `profile 里的一个 pnpm 补丁打不上了${which}。pnpm 会继续把这个包装上,但装的是没打补丁的原版——通常下次启动才会以「插件加载失败」暴露出来。多半是包升级后挪动了补丁指向的文件(例如补丁改的是 client/client.js,而新版本发的是 lib/client.js)。请更新或删掉这个补丁文件,以及 profile package.json 里 pnpm.patchedDependencies 中对应的那一条 / a pnpm patch in this profile no longer applies${whichEn}. pnpm still installs the package, but unpatched — which usually surfaces at the next boot as "failed to load plugins" rather than here. The usual cause is the package moving the file the patch targets (for example a patch against client/client.js when the release now ships lib/client.js). Update or remove that patch file and its entry under pnpm.patchedDependencies in the profile's package.json`,
|
|
154
|
+
}
|
|
155
|
+
}
|
|
134
156
|
if (output.includes('ERR_PNPM_ADDING_TO_ROOT')) {
|
|
135
157
|
return {
|
|
136
158
|
code: 'adding-to-root',
|