dsh-mini-utility-dock 0.1.5 → 0.1.7
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.en.md +10 -0
- package/CHANGELOG.md +10 -0
- package/dist/guard.js +9 -8
- package/dist/loopback.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.en.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.7 - 2026-09-20
|
|
4
|
+
|
|
5
|
+
- The two host-side fragments no longer state how many consumers exist: "all three plugins", "the three disagree" and "the three plugins / diverged three times" give way to wording that names no count. A fragment is embedded verbatim into each consumer, where the reader cannot know how many sibling repositories exist — the count is workspace knowledge, not that repository's.
|
|
6
|
+
- The fragments' bytes change, so consumers must re-run `loopback:sync` / `guard:sync` and raise their pin to 0.1.7.
|
|
7
|
+
|
|
8
|
+
## 0.1.6 - 2026-09-20
|
|
9
|
+
|
|
10
|
+
- Fix the `allowRemoteHost` note in `dist/guard.js`: it read "stop being admitted", the opposite of what the code does — that mode skips both checks, so it admits them. The JSDoc was already right; only this inline comment was inverted.
|
|
11
|
+
- The fragment's bytes change, so consumers must re-run `guard:sync` and raise their pin to 0.1.6.
|
|
12
|
+
|
|
3
13
|
## 0.1.5 - 2026-09-17
|
|
4
14
|
|
|
5
15
|
- Documentation maintenance: README and CHANGELOG cleanup. Fragments and command behavior are unchanged, so consumer pins need no update.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.7 - 2026-09-20
|
|
4
|
+
|
|
5
|
+
- 两个 host 侧片段的注释不再带消费仓数量:「all three plugins」「the three disagree」「the three plugins / diverged three times」改为不指名、不计数的说法。片段会逐字嵌入消费仓,那里的读者无从得知有几个同级仓,计数是工作区知识而非该仓知识。
|
|
6
|
+
- 片段字节因此变化,消费仓需重新运行 `loopback:sync` / `guard:sync` 并把 pin 升到 0.1.7。
|
|
7
|
+
|
|
8
|
+
## 0.1.6 - 2026-09-20
|
|
9
|
+
|
|
10
|
+
- 修正 `dist/guard.js` 里 `allowRemoteHost` 的说明文字:原文写作「不再被放行」,与代码相反——开启该模式时这两项检查被跳过,即被放行。JSDoc 一直是对的,只有这处行内注释写反。
|
|
11
|
+
- 该片段的字节因此变化,消费仓需重新运行 `guard:sync` 并把 pin 升到 0.1.6。
|
|
12
|
+
|
|
3
13
|
## 0.1.5 - 2026-09-17
|
|
4
14
|
|
|
5
15
|
- 文档维护:README 与 CHANGELOG 的整理,片段与命令行为不变,故无需改动消费仓的 pin。
|
package/dist/guard.js
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
// file, so an import of a sibling module would both break the standalone promise
|
|
22
22
|
// and collide with the exports the block above already declares.
|
|
23
23
|
//
|
|
24
|
-
// Why the guard is shared rather than reimplemented per plugin:
|
|
25
|
-
//
|
|
24
|
+
// Why the guard is shared rather than reimplemented per plugin: each consumer
|
|
25
|
+
// carried its own `createGuard`, and the copies diverged repeatedly. The
|
|
26
26
|
// parts that differed were never the *decisions* — they were the error codes and
|
|
27
27
|
// message strings welded into the same function, which forced every repo to keep
|
|
28
28
|
// its own copy and made drift possible. Here the enforcement order and every
|
|
@@ -134,12 +134,13 @@ const bindGuard = ({ currentPort, respond, allowRemoteHost, policy } = {}) => {
|
|
|
134
134
|
return deny(res, 'unknown_peer')
|
|
135
135
|
}
|
|
136
136
|
// `allowRemoteHost` buys exactly one thing: an off-loopback peer AND an
|
|
137
|
-
// off-loopback Host stop being
|
|
138
|
-
//
|
|
139
|
-
//
|
|
140
|
-
//
|
|
141
|
-
//
|
|
142
|
-
// Host criteria
|
|
137
|
+
// off-loopback Host stop being *rejected* by this guard — both checks below
|
|
138
|
+
// are skipped — because the caller has opted into verifying its own
|
|
139
|
+
// credential per request. Everything else still applies: the Origin check
|
|
140
|
+
// below rejects cross-site traffic in both modes, so the exemption never
|
|
141
|
+
// widens the browser-facing boundary. A plugin that does not pass the
|
|
142
|
+
// predicate never enters this mode, so for it the peer and Host criteria
|
|
143
|
+
// are absolute.
|
|
143
144
|
const remote = fleetAllowed()
|
|
144
145
|
if (!remote && !isLoopbackAddress(peerAddress)) {
|
|
145
146
|
return deny(res, 'non_loopback_peer')
|
package/dist/loopback.js
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
// the dock is that a plugin works with no sibling installed.
|
|
11
11
|
//
|
|
12
12
|
// Why it is shared at all: these predicates were copy-pasted per repo and
|
|
13
|
-
// drifted twice. The first drift rejected IPv6 loopback
|
|
14
|
-
//
|
|
13
|
+
// drifted twice. The first drift rejected IPv6 loopback everywhere; the second
|
|
14
|
+
// is that consumers disagreed on which Host spellings count as loopback
|
|
15
15
|
// (see scripts/guard-parity.mjs, which compares this block across repos).
|
|
16
16
|
//
|
|
17
17
|
// "Loopback" is decided in exactly one place — LOOPBACK_HOSTNAMES plus the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mini-utility-dock",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Canonical fragments and a build-time embedding CLI shared by DSH plugins: the Mini Utility Dock bootstrap for client halves, and the loopback predicates plus the host request guard for host halves.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|