@linxin666/dsh-client-ui-plugin-manager 0.4.7 → 0.4.9

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.
@@ -72,6 +72,23 @@ export declare function findBareRow(root: YAMLSeq, id: string): {
72
72
  * @returns the claimed insert ids, in order.
73
73
  */
74
74
  export declare function claimedIdsOf(patchText: string): string[];
75
+ /**
76
+ * Every entry id a layer declares: its top-level `- id:` rows (bare override
77
+ * rows and config rows alike) plus the entries of its `- insert:` lists. Ids
78
+ * nested inside a row's own `config:` are composition children of that entry,
79
+ * not layer entries, and are not declared here.
80
+ *
81
+ * This answers "does this layer still declare that row?" without composing, so
82
+ * it stays true in the states where a composition probe is not: a host that
83
+ * composes mid-upgrade, or while a bundle's package is being replaced, drops
84
+ * rows whose layers still exist.
85
+ * @param patchText - a patch layer's text.
86
+ * @param filename - absolute path (diagnostics only).
87
+ * @returns the declared ids, in file order, without duplicates.
88
+ * @throws when the layer does not parse; a caller must then treat this layer's
89
+ * declarations as unknown rather than empty.
90
+ */
91
+ export declare function declaredRowIds(patchText: string, filename: string): string[];
75
92
  /** One insert entry of a bundle patch: the claimed id and the plugin package name. */
76
93
  export interface InsertRow {
77
94
  id?: string;
@@ -152,3 +169,37 @@ export interface PrunedOverrides {
152
169
  * @returns the rewritten text and the pruned ids.
153
170
  */
154
171
  export declare function pruneOrphanRowOverrides(text: string, filename: string, composedIds: ReadonlySet<string>): PrunedOverrides;
172
+ /** The live entry names by id, and the rows this manager repaired. */
173
+ export interface RepairedRowNames {
174
+ /** The new file text; the original text when nothing was repaired. */
175
+ readonly text: string;
176
+ /** The repaired rows, in file order. */
177
+ readonly repaired: Array<{
178
+ id: string;
179
+ from: string;
180
+ to: string;
181
+ }>;
182
+ }
183
+ /**
184
+ * Point the profile's own rows at the packages that now carry those entry ids.
185
+ *
186
+ * The include patch semantics skip a row whose `name` does not match the name
187
+ * of the row a bundle inserted under that id, and the skip takes the whole row
188
+ * with it: a config row stops configuring anything and a `disabled` override
189
+ * stops disabling anything, both without a word in the browser. A package that
190
+ * changes its name — the aggregate's family rows moved from the
191
+ * `@linxin666/dsh-web-all/<family>` subpath to the real package in issue
192
+ * #1901 — therefore leaves every profile row that named it dead.
193
+ *
194
+ * The live names come from the installed bundles' own patch files, which is
195
+ * where the loader takes the row it inserts, so a repaired row names exactly
196
+ * the package the loader mounts under that id. A row whose id no bundle claims
197
+ * is left alone: its package may still be carried by a layer this manager
198
+ * cannot see, and a name it cannot prove is a name it must not write.
199
+ *
200
+ * @param text - current patch file text.
201
+ * @param filename - absolute path (diagnostics only).
202
+ * @param liveNames - the live entry names, by entry id.
203
+ * @returns the rewritten text and the repaired rows.
204
+ */
205
+ export declare function repairStaleRowNames(text: string, filename: string, liveNames: ReadonlyMap<string, string>): RepairedRowNames;
@@ -10,12 +10,16 @@ import type { LayerSnapshot } from '../core/patch-diff.ts';
10
10
  import { type ProfileFacts } from './profile.ts';
11
11
  /**
12
12
  * Entry rows that must never carry a disabled override: the manager tab
13
- * itself (the UI performing the write), the family settings surface the tab
14
- * injects into, and the aggregate compat face (disabling it unmounts the
15
- * whole folded client bundle while host rows keep running — a half-dead
16
- * page). Covers both the standalone and the aggregate row ids. The standalone
17
- * id is this package's own `cordis.patch.yml` insert id, never the official
18
- * `ui-plugin-manager` row the DSH web-app bundle already claims.
13
+ * itself (the UI performing the write) and the family settings surface the
14
+ * tab injects into. Covers both the standalone and the aggregate row ids. The
15
+ * standalone id is this package's own `cordis.patch.yml` insert id, never the
16
+ * official `ui-plugin-manager` row the DSH web-app bundle already claims.
17
+ *
18
+ * `web-ui-compat` is deliberately NOT locked (issue #1901). It used to be:
19
+ * the compat row carried the inlined browser half of every family, so
20
+ * disabling it blanked the whole page while the host rows kept running. Family
21
+ * rows mount their own packages now, and the compat row is the optional
22
+ * compatibility patch layer the issue asks users to be able to turn off.
19
23
  */
20
24
  export declare const LOCKED_ENTRY_IDS: ReadonlySet<string>;
21
25
  /** The listing result: plugin rows plus the raw layer snapshot for diffs. */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@linxin666/dsh-client-ui-plugin-manager",
3
3
  "description": "Update checking for the dsh web GUI's official Plugins page: compares installed plugins against the version their registry source serves, gates the update on the DSH runtime minimum the release declares, and drives the update through the official installer channel or this package's loopback CLI gateway.",
4
- "version": "0.4.7",
4
+ "version": "0.4.9",
5
5
  "icon": "icon.svg",
6
6
  "type": "module",
7
7
  "main": "lib/index.js",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "dsh": {
22
22
  "engines": {
23
- "dsh": ">=0.2.1-rc.2"
23
+ "dsh": ">=0.2.1-rc.3"
24
24
  },
25
25
  "bundle": {
26
26
  "patch": "./cordis.patch.yml"
@@ -34,25 +34,26 @@
34
34
  }
35
35
  },
36
36
  "peerDependencies": {
37
- "@deepseek-ai/dsh": ">=0.2.1-rc.2",
37
+ "@deepseek-ai/dsh": ">=0.2.1-rc.3",
38
38
  "react": "^18.2.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@deepseek-ai/cordis": "^4.0.5",
42
- "@deepseek-ai/dsh-api-session-controller": "^0.2.1-rc.2",
43
- "@deepseek-ai/dsh-api-workspace-controller": "^0.2.1-rc.2",
44
- "@deepseek-ai/dsh-client-connection": "^0.2.1-rc.2",
45
- "@deepseek-ai/dsh-client-locale": "^0.2.1-rc.2",
46
- "@deepseek-ai/dsh-client-ui-primitives": "^0.2.1-rc.2",
47
- "@deepseek-ai/dsh-client-ui-renderer": "^0.2.1-rc.2",
48
- "@deepseek-ai/dsh-client-ui-settings": "^0.2.1-rc.2",
49
- "@deepseek-ai/dsh-client-ui-slots": "^0.2.1-rc.2",
50
- "@deepseek-ai/dsh-client-ui-workspace": "^0.2.1-rc.2",
51
- "@deepseek-ai/dsh-host-webserver": "^0.2.1-rc.2",
42
+ "@deepseek-ai/dsh-api-session-controller": "^0.2.1-rc.3",
43
+ "@deepseek-ai/dsh-api-workspace-controller": "^0.2.1-rc.3",
44
+ "@deepseek-ai/dsh-client-connection": "^0.2.1-rc.3",
45
+ "@deepseek-ai/dsh-client-locale": "^0.2.1-rc.3",
46
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.2.1-rc.3",
47
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.2.1-rc.3",
48
+ "@deepseek-ai/dsh-client-ui-settings": "^0.2.1-rc.3",
49
+ "@deepseek-ai/dsh-client-ui-slots": "^0.2.1-rc.3",
50
+ "@deepseek-ai/dsh-client-ui-workspace": "^0.2.1-rc.3",
51
+ "@deepseek-ai/dsh-host-webserver": "^0.2.1-rc.3",
52
52
  "@testing-library/react": "^16.1.0",
53
53
  "@types/node": "^22.20.0",
54
54
  "@types/react": "~18.3.1",
55
55
  "@types/react-dom": "^18.3.5",
56
+ "@types/semver": "^7.8.0",
56
57
  "jsdom": "^26.0.0",
57
58
  "react": "^18.3.1",
58
59
  "react-dom": "^18.3.1",
@@ -73,6 +74,7 @@
73
74
  ],
74
75
  "license": "BSD-3-Clause",
75
76
  "dependencies": {
77
+ "semver": "^7.8.5",
76
78
  "yaml": "^2.8.2"
77
79
  },
78
80
  "scripts": {