dsh-remote 0.8.10 → 0.8.11
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/cordis.patch.yml +53 -53
- package/lib/client.js +1986 -1496
- package/package.json +1 -1
package/cordis.patch.yml
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
# dsh-remote bundle patch: inserts this plugin into a profile's layer stack.
|
|
2
|
-
# Applied when a profile lists this bundle; rows reference the package by name so
|
|
3
|
-
# Node resolution finds the installed code.
|
|
4
|
-
#
|
|
5
|
-
# Since v0.7.2 dsh-remote ships dsh-better-sidebar as a hard dependency and
|
|
6
|
-
# mounts it here, so `dsh plugin add dsh-remote` brings up the sidebar with
|
|
7
|
-
# zero extra steps. The sidebar row uses a DEDICATED id (`dsh-remote-sidebar`)
|
|
8
|
-
# and a guard so it backs off when another row mounts `dsh-better-sidebar`
|
|
9
|
-
# (e.g. the user installed the sidebar bundle on its own, or an aggregate
|
|
10
|
-
# bundle owns it) — two enabled mounts would both register /sidebar/api and
|
|
11
|
-
# fail the whole plugin tree at boot.
|
|
12
|
-
#
|
|
13
|
-
# Order-independence (issue #12): the guard must NOT depend on
|
|
14
|
-
# `ctx.loader.entries()` creation order. The loader creates entries in bundle
|
|
15
|
-
# order and each row's disabled expression is evaluated at creation time, when
|
|
16
|
-
# only rows created BEFORE it are visible — so with
|
|
17
|
-
# `bundles: [..., "dsh-remote", "dsh-better-sidebar", ...]` (standalone sidebar
|
|
18
|
-
# installed after dsh-remote, the normal `dsh plugin add` append order) both
|
|
19
|
-
# rows saw no other sidebar mount and BOTH started, crashing boot with
|
|
20
|
-
# `duplicate prefix route "/sidebar/api"`.
|
|
21
|
-
#
|
|
22
|
-
# Instead we scan the COMPOSED PATCH STACK — the include entry's
|
|
23
|
-
# `config.patches` (every bundle layer in `dsh.profile.bundles` order, then the
|
|
24
|
-
# profile/home/overlay layers) — for any OTHER row that mounts
|
|
25
|
-
# `dsh-better-sidebar`. That data is fully materialized before any row guard
|
|
26
|
-
# evaluates, so the outcome is identical no matter where the standalone bundle
|
|
27
|
-
# sits in the bundle list. It is also pure data: it never reads another row's
|
|
28
|
-
# `disabled` (reading another row's disabled expression would recursively
|
|
29
|
-
# re-enter the loader — dsh-better-sidebar's own row carries one too, so the
|
|
30
|
-
# two would ping-pong), so no recursion is possible. The old entries()-based
|
|
31
|
-
# check is kept as a belt-and-suspenders fallback for rows not visible in the
|
|
32
|
-
# patch stack (e.g. an entry injected at runtime by HMR or another plugin).
|
|
33
|
-
- insert:
|
|
34
|
-
- id: dsh-remote
|
|
35
|
-
name: 'dsh-remote'
|
|
36
|
-
- id: dsh-remote-sidebar
|
|
37
|
-
name: 'dsh-better-sidebar'
|
|
38
|
-
disabled: !!js >-
|
|
39
|
-
(function () {
|
|
40
|
-
try {
|
|
41
|
-
const inc = ctx.loader && ctx.loader.resolve && ctx.loader.resolve('include')
|
|
42
|
-
const patches = inc && inc.subtree && inc.subtree.config && inc.subtree.config.patches
|
|
43
|
-
if (Array.isArray(patches)) {
|
|
44
|
-
for (const p of patches) {
|
|
45
|
-
if (!p || !Array.isArray(p.insert)) continue
|
|
46
|
-
for (const row of p.insert) {
|
|
47
|
-
if (row && row.name === 'dsh-better-sidebar' && row.id !== 'dsh-remote-sidebar') return true
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
} catch (e) {}
|
|
52
|
-
return [...ctx.loader.entries()].some((e) => e.options.name === 'dsh-better-sidebar' && e.options.id !== 'dsh-remote-sidebar')
|
|
53
|
-
})()
|
|
1
|
+
# dsh-remote bundle patch: inserts this plugin into a profile's layer stack.
|
|
2
|
+
# Applied when a profile lists this bundle; rows reference the package by name so
|
|
3
|
+
# Node resolution finds the installed code.
|
|
4
|
+
#
|
|
5
|
+
# Since v0.7.2 dsh-remote ships dsh-better-sidebar as a hard dependency and
|
|
6
|
+
# mounts it here, so `dsh plugin add dsh-remote` brings up the sidebar with
|
|
7
|
+
# zero extra steps. The sidebar row uses a DEDICATED id (`dsh-remote-sidebar`)
|
|
8
|
+
# and a guard so it backs off when another row mounts `dsh-better-sidebar`
|
|
9
|
+
# (e.g. the user installed the sidebar bundle on its own, or an aggregate
|
|
10
|
+
# bundle owns it) — two enabled mounts would both register /sidebar/api and
|
|
11
|
+
# fail the whole plugin tree at boot.
|
|
12
|
+
#
|
|
13
|
+
# Order-independence (issue #12): the guard must NOT depend on
|
|
14
|
+
# `ctx.loader.entries()` creation order. The loader creates entries in bundle
|
|
15
|
+
# order and each row's disabled expression is evaluated at creation time, when
|
|
16
|
+
# only rows created BEFORE it are visible — so with
|
|
17
|
+
# `bundles: [..., "dsh-remote", "dsh-better-sidebar", ...]` (standalone sidebar
|
|
18
|
+
# installed after dsh-remote, the normal `dsh plugin add` append order) both
|
|
19
|
+
# rows saw no other sidebar mount and BOTH started, crashing boot with
|
|
20
|
+
# `duplicate prefix route "/sidebar/api"`.
|
|
21
|
+
#
|
|
22
|
+
# Instead we scan the COMPOSED PATCH STACK — the include entry's
|
|
23
|
+
# `config.patches` (every bundle layer in `dsh.profile.bundles` order, then the
|
|
24
|
+
# profile/home/overlay layers) — for any OTHER row that mounts
|
|
25
|
+
# `dsh-better-sidebar`. That data is fully materialized before any row guard
|
|
26
|
+
# evaluates, so the outcome is identical no matter where the standalone bundle
|
|
27
|
+
# sits in the bundle list. It is also pure data: it never reads another row's
|
|
28
|
+
# `disabled` (reading another row's disabled expression would recursively
|
|
29
|
+
# re-enter the loader — dsh-better-sidebar's own row carries one too, so the
|
|
30
|
+
# two would ping-pong), so no recursion is possible. The old entries()-based
|
|
31
|
+
# check is kept as a belt-and-suspenders fallback for rows not visible in the
|
|
32
|
+
# patch stack (e.g. an entry injected at runtime by HMR or another plugin).
|
|
33
|
+
- insert:
|
|
34
|
+
- id: dsh-remote
|
|
35
|
+
name: 'dsh-remote'
|
|
36
|
+
- id: dsh-remote-sidebar
|
|
37
|
+
name: 'dsh-better-sidebar'
|
|
38
|
+
disabled: !!js >-
|
|
39
|
+
(function () {
|
|
40
|
+
try {
|
|
41
|
+
const inc = ctx.loader && ctx.loader.resolve && ctx.loader.resolve('include')
|
|
42
|
+
const patches = inc && inc.subtree && inc.subtree.config && inc.subtree.config.patches
|
|
43
|
+
if (Array.isArray(patches)) {
|
|
44
|
+
for (const p of patches) {
|
|
45
|
+
if (!p || !Array.isArray(p.insert)) continue
|
|
46
|
+
for (const row of p.insert) {
|
|
47
|
+
if (row && row.name === 'dsh-better-sidebar' && row.id !== 'dsh-remote-sidebar') return true
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
} catch (e) {}
|
|
52
|
+
return [...ctx.loader.entries()].some((e) => e.options.name === 'dsh-better-sidebar' && e.options.id !== 'dsh-remote-sidebar')
|
|
53
|
+
})()
|