@ryuu-64/dsh-find-all 0.1.0 → 0.1.1
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/CHANGELOG.md +47 -0
- package/README.md +51 -0
- package/lib/client.js +1 -1
- package/package.json +7 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **The client bundle now registers under the package name.** `lib/client.js` called
|
|
8
|
+
`window.__ModuleLoader__.load({ id: "dsh-find-all", ... })` — the unscoped name — while the
|
|
9
|
+
package is `@ryuu-64/dsh-find-all`. The host composes the boot-graph row id from the package
|
|
10
|
+
name (`ClientModuleRegistry.reconcilePackage`), and `ClientModuleSystem.arrive()` rejects the
|
|
11
|
+
row when the executed bundle did not register a factory under exactly that key, so the plugin
|
|
12
|
+
loaded and then failed with:
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
failed to import loader entry <id>: client-modules: bundle /plugins/??...&rev=...
|
|
16
|
+
loaded without registering "@ryuu-64/dsh-find-all" via __ModuleLoader__.load
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The GUI surfaced this as "Failed to load plugins / 部分插件加载失败", which reads like a DSH
|
|
20
|
+
version incompatibility; it was not.
|
|
21
|
+
|
|
22
|
+
Introduced by the 0.1.0 fork, which renamed every other `dsh-find-bar` identifier to
|
|
23
|
+
`dsh-find-all` but left the registration id unscoped. `id` is now `"@ryuu-64/dsh-find-all"`.
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- `scripts/check-client-registration.mjs` (wired into `npm run check`): reads the expected id from
|
|
28
|
+
`package.json` and fails with a `file:line` diagnostic when the bundle registers anything else,
|
|
29
|
+
so the drift cannot come back unnoticed. It takes an optional package root, so it can inspect a
|
|
30
|
+
registry tarball or an installed profile instead of only this checkout.
|
|
31
|
+
- `npm run verify:release`: packs the artifact `npm publish` would upload and checks the id inside
|
|
32
|
+
that tarball. This is the check that would have caught 0.1.0 before it reached the registry.
|
|
33
|
+
- `npm run deploy:profile`: installs a published release into a DSH profile and refuses to finish
|
|
34
|
+
until the installed bundle is byte-identical to the registry artifact and registers correctly.
|
|
35
|
+
Rolls the profile manifests back on any failure.
|
|
36
|
+
- Tests for the registration check itself (`test/client-registration-check.test.mjs`): they run it
|
|
37
|
+
against a mutated copy, which is how the check was caught silently falling back to the checkout
|
|
38
|
+
and reporting the defective registry 0.1.0 as clean.
|
|
39
|
+
- `test/bundle-registration.test.mjs`: the invariant as a test, with the expected value read
|
|
40
|
+
from `package.json` rather than hardcoded.
|
|
41
|
+
- README section on the "Failed to load plugins" symptom, why it is not a DSH version problem, and
|
|
42
|
+
the fork re-scope hazard behind it.
|
|
43
|
+
|
|
44
|
+
## 0.1.0
|
|
45
|
+
|
|
46
|
+
Initial release: a Ctrl+F find bar that searches the whole conversation, forked from
|
|
47
|
+
[`secyborg/dsh-find-bar`](https://github.com/secyborg/dsh-find-bar) (MIT).
|
package/README.md
CHANGED
|
@@ -46,11 +46,62 @@ dsh plugin --profile desktop add @ryuu-64/dsh-find-all
|
|
|
46
46
|
dsh plugin --profile desktop add link:/path/to/dsh-find-all
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
+
### 不依赖 npm 的安装(profile 用本仓库打好的 tarball)
|
|
50
|
+
|
|
51
|
+
当 registry 上还是旧版本(或发布被 2FA 卡住)时用这条:脚本把本仓库 `npm pack` 出来的
|
|
52
|
+
tarball **拷进 profile 目录**,并把依赖改成 `file:./dsh-find-all-<版本>.tgz`。pnpm 从它安装,
|
|
53
|
+
**以后再跑 `pnpm install` 也只会从这个 tarball 重装,不会去 registry 把旧版本拉回来**;
|
|
54
|
+
tarball 放在 profile 里(而不是仓库里),所以仓库的 `git clean -xfd` 不会把它扫掉,
|
|
55
|
+
锁文件里存的也是相对路径。
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
npm run install:local # 打包 → 校验 tarball 里的注册 id → 装进 profile → 逐字节自证
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
换回 registry 版本(发布成功之后):
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
npm run deploy:profile # 把依赖改回 ^<版本>,并证明装出来的字节与 registry 产物一致
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
> `deploy:profile` 会先确认目标版本**确实已发布**(否则拒绝并保持 profile 不变),
|
|
68
|
+
> 所以不会出现"依赖指向一个解析不到的版本、下次 install 直接崩"的情况。
|
|
69
|
+
|
|
49
70
|
> 注意:它与 `dsh-find-bar` **都会抢 Ctrl+F**,请只保留一个:
|
|
50
71
|
> ```sh
|
|
51
72
|
> dsh plugin --profile desktop remove dsh-find-bar
|
|
52
73
|
> ```
|
|
53
74
|
|
|
75
|
+
## 排障:GUI 报「Failed to load plugins / 部分插件加载失败」
|
|
76
|
+
|
|
77
|
+
如果报错长这样:
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
failed to import loader entry <id>: client-modules: bundle /plugins/??...&rev=...
|
|
81
|
+
loaded without registering "@ryuu-64/dsh-find-all" via __ModuleLoader__.load
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**这不是 DSH 版本不兼容,别去恢复模式卸载、也别新建 Profile。** 它只有一个含义:
|
|
85
|
+
`lib/client.js` 里 `window.__ModuleLoader__.load({ id })` 的 id 与**包名**不一致。
|
|
86
|
+
|
|
87
|
+
宿主(`@deepseek-ai/dsh-client-modules`)用「解析出的 package.json 包名」当浏览器模块身份
|
|
88
|
+
(规范的 `WebBootEntry.id` 注释就是 *Entry name == package name*),
|
|
89
|
+
`ClientModuleSystem.arrive()` 在脚本加载成功后按这个 key 查 factory 表,查不到就抛这一句。
|
|
90
|
+
|
|
91
|
+
0.1.0 就是这个毛病:fork 自非 scoped 的 `dsh-find-bar` 时,包名改成 `@ryuu-64/dsh-find-all`,
|
|
92
|
+
bundle 里的 id 却写成了裸名 `dsh-find-all`。0.1.1 已修,并加了门禁:
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
npm run check:registration # 期望值从 package.json 读,比 bundle 实际注册值
|
|
96
|
+
npm run verify:release # 打包成 tarball 再验一遍(发布前跑)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
> **Fork / 改名提醒**:给 scoped 包 fork 一个非 scoped 包时,危险的不是包名本身,
|
|
100
|
+
> 而是散落在 bundle 里的**派生字面量**。官方工具链(`packages/client/tsdown.client.ts`
|
|
101
|
+
> 的 `clientBundle(id, ...)`)把 id 当参数盖章,社区脚手架(`create-dsh-plugin`)用
|
|
102
|
+
> `{{PKG_NAME}}` 模板变量注入——都是为了让这个字面量无法被手写错。
|
|
103
|
+
> 本包的 bundle 是手写并入库的,所以用上面两条命令代替盖章。
|
|
104
|
+
|
|
54
105
|
## 卸载 / 回退
|
|
55
106
|
|
|
56
107
|
```sh
|
package/lib/client.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryuu-64/dsh-find-all",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Ctrl+F find bar for the DSH desktop app: it searches the whole conversation, not just the messages already on screen.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"lib",
|
|
15
15
|
"cordis.patch.yml",
|
|
16
16
|
"README.md",
|
|
17
|
+
"CHANGELOG.md",
|
|
17
18
|
"NOTICE.md",
|
|
18
19
|
"LICENSE"
|
|
19
20
|
],
|
|
@@ -40,7 +41,11 @@
|
|
|
40
41
|
},
|
|
41
42
|
"scripts": {
|
|
42
43
|
"test": "node --test \"test/**/*.test.mjs\"",
|
|
43
|
-
"check": "node
|
|
44
|
+
"check:registration": "node scripts/check-client-registration.mjs",
|
|
45
|
+
"check": "node --check lib/index.js && node --check lib/client.js && npm run check:registration && node --test \"test/**/*.test.mjs\"",
|
|
46
|
+
"verify:release": "node scripts/verify-release.mjs",
|
|
47
|
+
"install:local": "node scripts/install-local.mjs",
|
|
48
|
+
"deploy:profile": "node scripts/deploy-profile.mjs"
|
|
44
49
|
},
|
|
45
50
|
"keywords": [
|
|
46
51
|
"dsh",
|