@maiyunnet/kebab 9.11.3 → 9.11.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.
- package/doc/kebab-rag.md +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/undici/response.d.ts +1 -1
- package/lib/undici.js +7 -7
- package/package.json +1 -1
package/doc/kebab-rag.md
CHANGED
|
@@ -1360,7 +1360,7 @@ index/variables/VER.md
|
|
|
1360
1360
|
|
|
1361
1361
|
# Variable: VER
|
|
1362
1362
|
|
|
1363
|
-
> `const` **VER**: `"9.11.
|
|
1363
|
+
> `const` **VER**: `"9.11.4"` = `'9.11.4'`
|
|
1364
1364
|
|
|
1365
1365
|
Defined in: [index.ts:10](https://github.com/maiyunnet/kebab/blob/master/index.ts#L10)
|
|
1366
1366
|
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* --- 本文件用来定义每个目录实体地址的常量 ---
|
|
7
7
|
*/
|
|
8
8
|
/** --- 当前系统版本号 --- */
|
|
9
|
-
export const VER = '9.11.
|
|
9
|
+
export const VER = '9.11.4';
|
|
10
10
|
// --- 服务端用的路径 ---
|
|
11
11
|
const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
|
|
12
12
|
/** --- /xxx/xxx --- */
|
package/lib/undici/response.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare class Response {
|
|
|
31
31
|
/**
|
|
32
32
|
* --- 获取响应读取流对象 ---
|
|
33
33
|
*/
|
|
34
|
-
getStream(): (import("undici/types/readable").default & undici.Dispatcher.BodyMixin) |
|
|
34
|
+
getStream(): zlib.BrotliDecompress | zlib.Gunzip | zlib.Inflate | (import("undici/types/readable").default & undici.Dispatcher.BodyMixin) | null;
|
|
35
35
|
/**
|
|
36
36
|
* --- 获取原生响应读取流对象 ---
|
|
37
37
|
*/
|
package/lib/undici.js
CHANGED
|
@@ -227,10 +227,7 @@ export async function fetch(input, init = {}) {
|
|
|
227
227
|
};
|
|
228
228
|
// --- 检查是否已中止(注意:请求发起后无法中止) ---
|
|
229
229
|
if (init.signal?.aborted) {
|
|
230
|
-
|
|
231
|
-
'status': 0,
|
|
232
|
-
'statusText': 'Aborted',
|
|
233
|
-
});
|
|
230
|
+
throw new DOMException('This operation was aborted', 'AbortError');
|
|
234
231
|
}
|
|
235
232
|
// --- 发起请求 ---
|
|
236
233
|
const res = await request(u, body, opt);
|
|
@@ -256,11 +253,14 @@ export async function fetch(input, init = {}) {
|
|
|
256
253
|
}
|
|
257
254
|
}
|
|
258
255
|
}
|
|
259
|
-
|
|
260
|
-
|
|
256
|
+
if (res.error) {
|
|
257
|
+
throw new TypeError(res.error.message ?? 'fetch failed');
|
|
258
|
+
}
|
|
259
|
+
const status = res.headers?.['http-code'] ?? 200;
|
|
260
|
+
if (!resStream) {
|
|
261
261
|
return new Response(null, {
|
|
262
262
|
'status': status,
|
|
263
|
-
'statusText':
|
|
263
|
+
'statusText': 'Unknown Error',
|
|
264
264
|
'headers': resHeaders,
|
|
265
265
|
});
|
|
266
266
|
}
|