dk-frontend-skills 3.0.5 → 3.0.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/core.js +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dk-frontend-skills",
3
- "version": "3.0.5",
3
+ "version": "3.0.6",
4
4
  "description": "dk-engineer - 幽默沉稳靠谱的前端开发助手 Claude Skills 配置包,一键注入 .claude/ 技能目录和 CLAUDE.md 人设配置",
5
5
  "author": "XiaoMa",
6
6
  "license": "MIT",
package/scripts/core.js CHANGED
@@ -242,10 +242,11 @@ async function downloadFile(url, destPath, onProgress) {
242
242
  if (done) break;
243
243
  downloaded += value.length;
244
244
  if (onProgress) onProgress(downloaded, total);
245
- writer.write(value);
245
+ const ok = writer.write(value);
246
+ if (!ok) await new Promise((resolve) => writer.once("drain", resolve));
246
247
  }
247
248
  } finally {
248
- writer.close();
249
+ await new Promise((resolve) => writer.end(resolve));
249
250
  }
250
251
 
251
252
  // 下载完后校验 gzip 格式