dsh-tiddlywiki 0.28.0 → 0.28.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/README.md +2 -0
- package/docs/CHANGELOG.md +2 -0
- package/docs/features.md +1 -1
- package/docs/usage.md +1 -0
- package/lib/client.js +28 -19
- package/lib/index.js +21 -7
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/client/endpoints.ts +15 -0
- package/src/client/note-widget.ts +133 -17
- package/src/client/settings-page.ts +74 -0
- package/src/client/styles.ts +9 -0
- package/src/index.ts +21 -13
package/lib/index.js
CHANGED
|
@@ -14591,6 +14591,27 @@ function apply(ctx, rawConfig = {}) {
|
|
|
14591
14591
|
const controlRegistryNow = () => controlRegistry ?? singleEntryRegistry(defaultCurrentLocation(), "main", "single");
|
|
14592
14592
|
const startupTask = (async () => {
|
|
14593
14593
|
try {
|
|
14594
|
+
/**
|
|
14595
|
+
* Ship the 「拆分知识库」 skill FIRST (v0.28.0).
|
|
14596
|
+
*
|
|
14597
|
+
* It is deliberately independent of the wiki: it only writes a file into
|
|
14598
|
+
* `$DSH_HOME/skills`, and it must still happen when the wiki is slow to
|
|
14599
|
+
* start, fails to start, or the user is mid-migration with a broken config.
|
|
14600
|
+
* (It used to sit after `farm.startAll()` — which meant a wiki that never
|
|
14601
|
+
* became ready also silently never installed the skill. Found by restarting
|
|
14602
|
+
* a real host, not by a test.)
|
|
14603
|
+
*
|
|
14604
|
+
* A plugin cannot register a skill ROOT, so writing into the user's own root
|
|
14605
|
+
* is the only zero-config path; it only ever touches its own file (the
|
|
14606
|
+
* marker line decides — see host/skill-install.ts).
|
|
14607
|
+
*/
|
|
14608
|
+
try {
|
|
14609
|
+
const installed = await installSplitSkill();
|
|
14610
|
+
if (installed.action === "failed") console.warn("[dsh-tiddlywiki] 拆库 skill 安装失败:", installed.error);
|
|
14611
|
+
else console.info(`[dsh-tiddlywiki] 拆库 skill:${installed.action}(${installed.path})`);
|
|
14612
|
+
} catch (err) {
|
|
14613
|
+
console.warn("[dsh-tiddlywiki] 拆库 skill 安装异常:", err);
|
|
14614
|
+
}
|
|
14594
14615
|
const read = await readRegistry({
|
|
14595
14616
|
file: registryFile,
|
|
14596
14617
|
legacyFile: locationStateFile,
|
|
@@ -14627,13 +14648,6 @@ function apply(ctx, rawConfig = {}) {
|
|
|
14627
14648
|
await farm.disposeAll();
|
|
14628
14649
|
return;
|
|
14629
14650
|
}
|
|
14630
|
-
if (!disposed) try {
|
|
14631
|
-
const installed = await installSplitSkill();
|
|
14632
|
-
if (installed.action === "failed") console.warn("[dsh-tiddlywiki] 拆库 skill 安装失败:", installed.error);
|
|
14633
|
-
else console.info(`[dsh-tiddlywiki] 拆库 skill:${installed.action}(${installed.path})`);
|
|
14634
|
-
} catch (err) {
|
|
14635
|
-
console.warn("[dsh-tiddlywiki] 拆库 skill 安装异常:", err);
|
|
14636
|
-
}
|
|
14637
14651
|
try {
|
|
14638
14652
|
await clipBridge.start(effectiveBridge().port);
|
|
14639
14653
|
console.info(`[dsh-tiddlywiki] clip bridge listening on 127.0.0.1:${clipBridge.port} (enabled=${effectiveBridge().enabled})`);
|