glasspane-harness 0.7.6 → 0.7.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/README.md +3 -2
- package/README.zh-CN.md +2 -1
- package/bin/glasspane-harness.exe +26 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -116,8 +116,9 @@ Two commands are installed: **`glasspane-harness`** and the short alias **`gp-ha
|
|
|
116
116
|
Some package managers do not run install scripts by default, and the wrapper's
|
|
117
117
|
`postinstall` is what places the real binary. Measured on 0.7.0: npm installs fine (npm 11+
|
|
118
118
|
may print an `allow-scripts` notice on the first install; the command still works), while
|
|
119
|
-
`bun add -g` skips that step and the command then prints its own remedy —
|
|
120
|
-
|
|
119
|
+
`bun add -g` skips that step and the command then prints its own remedy — from 0.7.7 that
|
|
120
|
+
line names this install's own directory, so running it verbatim is the fix. See
|
|
121
|
+
[docs/install.md](docs/install.md#channels).
|
|
121
122
|
|
|
122
123
|
**macOS only.** The engine, the permission model and the evidence pipeline exist only on
|
|
123
124
|
macOS, so the npm distribution is macOS-only too: the package declares `os: darwin` and
|
package/README.zh-CN.md
CHANGED
|
@@ -95,7 +95,8 @@ curl -fsSL https://raw.githubusercontent.com/jingzhao-l/glasspane-harness/main/s
|
|
|
95
95
|
|
|
96
96
|
有的包管理器默认不跑安装脚本,而把真二进制放到位的正是 wrapper 的 `postinstall`。
|
|
97
97
|
0.7.0 实测:npm 这条路是好的(npm 11+ 首次安装会打一条 `allow-scripts` 提示,命令照样能跑);
|
|
98
|
-
`bun add -g`
|
|
98
|
+
`bun add -g` 会跳过那一步,命令于是打印它自己的补救——0.7.7 起那一句点名的是**这一份安装自己
|
|
99
|
+
的目录**,所以照抄执行就是修法。
|
|
99
100
|
详见 [docs/install.md](docs/install.md)。
|
|
100
101
|
|
|
101
102
|
**只支持 macOS。** 引擎、权限模型、证据流水线都只存在于 macOS,npm 分发随之收成
|
|
@@ -1,10 +1,31 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
self=$0
|
|
3
|
+
i=0
|
|
4
|
+
while [ -L "$self" ] && [ $i -lt 8 ]; do
|
|
5
|
+
t=$(readlink "$self")
|
|
6
|
+
case $t in
|
|
7
|
+
/*) self=$t ;;
|
|
8
|
+
*) self=$(CDPATH= cd -P -- "$(dirname -- "$self")" && printf '%s/%s' "$PWD" "$t") ;;
|
|
9
|
+
esac
|
|
10
|
+
i=$((i + 1))
|
|
11
|
+
done
|
|
12
|
+
here=$(CDPATH= cd -P -- "$(dirname -- "$self")/.." 2>/dev/null && pwd)
|
|
1
13
|
echo "Error: glasspane-harness's postinstall script was not run." >&2
|
|
2
14
|
echo "" >&2
|
|
3
|
-
echo "
|
|
4
|
-
echo "
|
|
15
|
+
echo "The command on your PATH is still the placeholder the tarball ships, not the" >&2
|
|
16
|
+
echo "binary. Managers leave it in place when they gate lifecycle scripts: bun blocks a" >&2
|
|
17
|
+
echo "dependency's scripts until you trust it, npm skips them under --ignore-scripts," >&2
|
|
18
|
+
echo "and some managers skip them by default." >&2
|
|
5
19
|
echo "" >&2
|
|
6
|
-
|
|
7
|
-
echo "
|
|
20
|
+
if [ -n "$here" ]; then
|
|
21
|
+
echo "Run this install's own postinstall step:" >&2
|
|
22
|
+
echo " cd \"$here\" && node postinstall.mjs" >&2
|
|
23
|
+
echo "" >&2
|
|
24
|
+
fi
|
|
25
|
+
echo "Or let the package manager run it:" >&2
|
|
26
|
+
echo ' cd "$(npm root -g)/glasspane-harness" && node postinstall.mjs # npm global install' >&2
|
|
27
|
+
echo " bun pm trust glasspane-harness # in the project you installed into" >&2
|
|
8
28
|
echo "" >&2
|
|
9
|
-
echo "
|
|
29
|
+
echo "Either way the check afterwards is the same, and only a version number means it" >&2
|
|
30
|
+
echo "worked: glasspane-harness --version" >&2
|
|
10
31
|
exit 1
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"scripts": {
|
|
26
26
|
"postinstall": "node ./postinstall.mjs"
|
|
27
27
|
},
|
|
28
|
-
"version": "0.7.
|
|
28
|
+
"version": "0.7.7",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"os": [
|
|
31
31
|
"darwin"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"sideEffects": false,
|
|
46
46
|
"optionalDependencies": {
|
|
47
|
-
"glasspane-harness-darwin-arm64": "0.7.
|
|
48
|
-
"glasspane-harness-darwin-x64": "0.7.
|
|
47
|
+
"glasspane-harness-darwin-arm64": "0.7.7",
|
|
48
|
+
"glasspane-harness-darwin-x64": "0.7.7"
|
|
49
49
|
}
|
|
50
50
|
}
|