vanspod 0.4.1 → 0.4.3

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 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.4.1.tgz`;可在 Windows 用 `npm install -g <套件路徑>` 安裝測試。圖片、favicon、系統匣與移除腳本均包含在發佈產物中。更新 logo 後執行 `powershell.exe -NoProfile -File scripts/build-icon.ps1` 重建多尺寸 Windows icon。
41
+ exe 產物為 `dist/VansPod.exe`,本機套件為 `dist/vanspod-0.4.3.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`。
48
48
 
49
- 發版前同步 `package.json`、`package-lock.json` 與 `src/version.ts` 的版本;tag 必須等於 `v` 加版本號,否則流程失敗。以 `0.4.1` 為例:
49
+ 發版前同步 `package.json`、`package-lock.json` 與 `src/version.ts` 的版本;tag 必須等於 `v` 加版本號,否則流程失敗。以 `0.4.3` 為例:
50
50
 
51
51
  ```powershell
52
52
  git push origin master
53
- git tag -a v0.4.1 -m "VansPod 0.4.1"
54
- git push origin v0.4.1
53
+ git tag -a v0.4.3 -m "VansPod 0.4.3"
54
+ git push origin v0.4.3
55
55
  ```
56
56
 
57
57
  新版本使用新的版本號與 tag。相同 tag 的 Actions 重跑會更新該 Release 的產物。
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.environmentProgressScript = void 0;
4
4
  /**
5
- * 背景 Environment Install 的進度輪詢:頁面帶 data-environment-progress 時,每 500ms 讀 /environment-status
6
- * 更新每個工具的階段文字;安裝結束就重新整理頁面顯示結果。狀態在伺服器上,重新整理頁面後照樣接著輪詢。
5
+ * 背景 Environment Install 與第一次檢查的輪詢:頁面帶 data-environment-progress 時,每 500ms 讀 /environment-status
6
+ * 更新每個工具的階段文字;安裝或檢查結束就重新整理頁面顯示結果。狀態在伺服器上,重新整理頁面後照樣接著輪詢。
7
7
  */
8
8
  exports.environmentProgressScript = `
9
9
  (function () {
package/dist/page.js CHANGED
@@ -192,10 +192,14 @@ function environmentStageText(progress) {
192
192
  const percent = Math.min(100, Math.floor((progress.downloaded / progress.total) * 100));
193
193
  return `${text} ${megabytes(progress.downloaded)} / ${megabytes(progress.total)} MB(${percent}%)`;
194
194
  }
195
- /** GET /environment-status:背景 Environment Install 是否還在跑,以及這次安裝裡每個工具的階段文字。 */
195
+ /** 背景安裝或第一次檢查還沒結束時,頁面要輪詢,結束後重新整理顯示結果。 */
196
+ function environmentPolling(view) {
197
+ return view.environmentInstalling || environmentChecking(view);
198
+ }
199
+ /** GET /environment-status:背景 Environment Install 或第一次檢查是否還在跑,以及這次安裝裡每個工具的階段文字。 */
196
200
  function environmentStatus(view) {
197
201
  return {
198
- running: view.environmentInstalling,
202
+ running: environmentPolling(view),
199
203
  tools: view.tools.flatMap((tool) => (tool.progress ? [{ id: tool.id, stage: environmentStageText(tool.progress) }] : [])),
200
204
  };
201
205
  }
@@ -214,7 +218,7 @@ function environmentInner(view) {
214
218
  return `<label class="tool"><input type="checkbox" name="tool" value="${escapeHtml(tool.id)}"${checked}${off}> ${environmentIcons_1.environmentIcons[tool.id]}<span${title}>${escapeHtml(tool.label)}</span> ${mark}</label>`;
215
219
  })
216
220
  .join("");
217
- const polling = view.environmentInstalling ? " data-environment-progress" : "";
221
+ const polling = environmentPolling(view) ? " data-environment-progress" : "";
218
222
  const note = view.environmentNotice
219
223
  ? `<p class="hint">${escapeHtml(view.environmentNotice)}</p>`
220
224
  : "";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = "0.4.1";
4
+ exports.VERSION = "0.4.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vanspod",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "bin": { "vanspod": "bin/vanspod.cjs" },
5
5
  "engines": { "node": ">=24" },
6
6
  "os": ["win32"],