cvitool 1.0.783 → 1.0.784

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/CHANGELOG.md CHANGED
@@ -52,4 +52,8 @@
52
52
 
53
53
  ## [1.0.783] - 2025-12-02
54
54
  ### Fixed
55
- - 修复正则ratio限制两位数字问题
55
+ - 修复正则ratio限制两位数字问题
56
+
57
+ ## [1.0.784] - 2025-12-03
58
+ ### Fixed
59
+ - 修复checkURLResource函数请求发生CERT_HAS_EXPIRED时抛错问题
@@ -363,7 +363,7 @@ function checkURLResource(url, timeout) {
363
363
  res.resBody.destroy();
364
364
  }
365
365
  catch (e) {
366
- if (e.name !== 'statusCodeError' && !['ENOTFOUND', 'ECONNREFUSED'].includes(e.code)) {
366
+ if (e.name !== 'statusCodeError' && !['ENOTFOUND', 'ECONNREFUSED', 'CERT_HAS_EXPIRED'].includes(e.code)) {
367
367
  throw e;
368
368
  }
369
369
  obj.isEffective = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cvitool",
3
- "version": "1.0.783",
3
+ "version": "1.0.784",
4
4
  "description": "cvitool",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/cutil.ts CHANGED
@@ -399,7 +399,7 @@ async function checkURLResource(url: string, timeout?: number) {
399
399
  const res = await hgo.get(url, { resType: 'stream', timeout });
400
400
  (res.resBody as Readable).destroy();
401
401
  } catch (e) {
402
- if (e.name !== 'statusCodeError' && !['ENOTFOUND', 'ECONNREFUSED'].includes(e.code)) {
402
+ if (e.name !== 'statusCodeError' && !['ENOTFOUND', 'ECONNREFUSED', 'CERT_HAS_EXPIRED'].includes(e.code)) {
403
403
  throw e;
404
404
  }
405
405
  obj.isEffective = false;