vanspod 0.5.4 → 0.5.5
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 +4 -4
- package/dist/localCommands.js +13 -2
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ npm run dist
|
|
|
38
38
|
npm pack --pack-destination dist
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
exe 產物為 `dist/VansPod.exe`,本機套件為 `dist/vanspod-0.5.
|
|
41
|
+
exe 產物為 `dist/VansPod.exe`,本機套件為 `dist/vanspod-0.5.5.tgz`;可在 Windows 用 `npm install -g <套件路徑>` 安裝測試。圖片、favicon、系統匣與移除腳本均包含在發佈產物中。更新 logo 後執行 `powershell.exe -NoProfile -File scripts/build-icon.ps1` 重建多尺寸 Windows icon。
|
|
42
42
|
|
|
43
43
|
exe 發佈管道為本專案 GitHub Releases,npm 為公開 registry 的 [`vanspod`](https://www.npmjs.com/package/vanspod) 套件。更新時不要執行完整移除,否則會清除課堂資料。
|
|
44
44
|
|
|
@@ -46,12 +46,12 @@ exe 發佈管道為本專案 GitHub Releases,npm 為公開 registry 的 [`vans
|
|
|
46
46
|
|
|
47
47
|
一般 push 不發佈;推送 `v*` tag 會在 Windows runner 安裝 Node.js 24、檢查型別、執行測試、打包並驗證 exe/npm 生命週期,全部通過後才建立 GitHub Release,最後發佈 npm 套件。學生從 Release 下載 `VansPod.exe`,同頁提供 `SHA256SUMS.txt`。Release 另附 brotli 壓縮的 `VansPod.exe.br`(約三分之一大小),程式內更新只下載這份,解壓後再比對 `VansPod.exe` 的 SHA-256;SHA256SUMS 沒列出它的舊版 Release 則下載完整 exe。
|
|
48
48
|
|
|
49
|
-
發版前同步 `package.json`、`package-lock.json` 與 `src/version.ts` 的版本;tag 必須等於 `v` 加版本號,否則流程失敗。以 `0.5.
|
|
49
|
+
發版前同步 `package.json`、`package-lock.json` 與 `src/version.ts` 的版本;tag 必須等於 `v` 加版本號,否則流程失敗。以 `0.5.5` 為例:
|
|
50
50
|
|
|
51
51
|
```powershell
|
|
52
52
|
git push origin master
|
|
53
|
-
git tag -a v0.5.
|
|
54
|
-
git push origin v0.5.
|
|
53
|
+
git tag -a v0.5.5 -m "VansPod 0.5.5"
|
|
54
|
+
git push origin v0.5.5
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
新版本使用新的版本號與 tag。相同 tag 的 Actions 重跑會更新該 Release 的產物。
|
package/dist/localCommands.js
CHANGED
|
@@ -95,11 +95,22 @@ let nextRun = 0;
|
|
|
95
95
|
*/
|
|
96
96
|
async function runBashCommand(bash, command, folder, signal, options) {
|
|
97
97
|
const timeoutMs = options.timeoutMs;
|
|
98
|
+
// The log shows the command as running from here, so 停止 must work at once:
|
|
99
|
+
// a stop that comes while VansPod reads the PATH keeps Git Bash from starting.
|
|
100
|
+
let stopNow;
|
|
101
|
+
let stoppedEarly = false;
|
|
102
|
+
options.stoppable(() => { if (stopNow)
|
|
103
|
+
stopNow();
|
|
104
|
+
else
|
|
105
|
+
stoppedEarly = true; });
|
|
98
106
|
const env = await (0, systemPath_1.envWithRegistryPath)();
|
|
99
|
-
// From here to the spawn nothing waits, so a listed running command can always be stopped.
|
|
100
107
|
const stdout = collector();
|
|
101
108
|
const stderr = collector();
|
|
102
109
|
const ended = await new Promise(resolve => {
|
|
110
|
+
if (stoppedEarly || signal.aborted) {
|
|
111
|
+
resolve({ why: stoppedEarly ? "stopped" : "cancelled" });
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
103
114
|
let why;
|
|
104
115
|
let settled = false;
|
|
105
116
|
// The command and the pid file go in the environment, so no Windows argument quoting or globbing changes them.
|
|
@@ -136,7 +147,7 @@ async function runBashCommand(bash, command, folder, signal, options) {
|
|
|
136
147
|
child.stderr.on("data", (chunk) => collect(stderr, chunk));
|
|
137
148
|
child.on("error", error => finish({ error: error.message }));
|
|
138
149
|
child.on("close", code => finish(code === null ? {} : { code }));
|
|
139
|
-
|
|
150
|
+
stopNow = () => end("stopped");
|
|
140
151
|
});
|
|
141
152
|
if (ended.error) {
|
|
142
153
|
options.ended({});
|
package/dist/version.js
CHANGED