@kivii.com/bridge 1.1.3 → 1.1.4

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.
@@ -0,0 +1,38 @@
1
+ import { IDownloadResult } from '../interfaces/IDownloader';
2
+ /**
3
+ * 下载工具类
4
+ * 提供各种便捷的下载方法
5
+ */
6
+ export declare class DownloadUtils {
7
+ /**
8
+ * 从下载结果触发下载
9
+ * @param result 下载结果
10
+ * @param filename 可选的自定义文件名
11
+ */
12
+ static downloadFromResult(result: IDownloadResult, filename?: string): void;
13
+ /**
14
+ * 批量下载文件
15
+ * @param results 下载结果数组
16
+ * @param delay 下载间隔(毫秒)
17
+ */
18
+ static downloadMultiple(results: IDownloadResult[], delay?: number): Promise<void>;
19
+ /**
20
+ * 格式化文件大小
21
+ * @param bytes 字节数
22
+ * @returns 格式化后的大小字符串
23
+ */
24
+ static formatFileSize(bytes: number): string;
25
+ /**
26
+ * 格式化下载速度
27
+ * @param bytesPerSecond 每秒字节数
28
+ * @returns 格式化后的速度字符串
29
+ */
30
+ static formatDownloadSpeed(bytesPerSecond: number): string;
31
+ /**
32
+ * 格式化剩余时间
33
+ * @param seconds 剩余秒数
34
+ * @returns 格式化后的时间字符串
35
+ */
36
+ static formatRemainingTime(seconds: number): string;
37
+ }
38
+ //# sourceMappingURL=DownloadUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DownloadUtils.d.ts","sourceRoot":"","sources":["../../src/utils/DownloadUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D;;;GAGG;AACH,qBAAa,aAAa;IACxB;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;IAqB3E;;;;OAIG;WACU,gBAAgB,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,KAAK,GAAE,MAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAS7F;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAU5C;;;;OAIG;IACH,MAAM,CAAC,mBAAmB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM;IAI1D;;;;OAIG;IACH,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;CAcpD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kivii.com/bridge",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Kivii Bridge - A comprehensive toolkit library with request handling, logging, and utility functions",
5
5
  "keywords": [
6
6
  "kivii",