@flun/mailer 2.1.6 → 2.1.7

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
@@ -1,4 +1,4 @@
1
1
  # 变更日志
2
- ## [2.1.6] - 2026-04-30 16:33
3
- ### 修复:
4
- - 修复了shard.js文件中dns报未定义的错误;
2
+ ## [2.1.7] - 2026-05-01 17:30
3
+ ### 优化:
4
+ - 优化了内部处理逻辑;
package/copy-files.js CHANGED
@@ -31,6 +31,5 @@ const copyFile = () => {
31
31
  }
32
32
  }
33
33
 
34
- // 执行脚本并导出函数
35
34
  if (process.argv[1] === __filename) copyFile();
36
35
  export { copyFile };
package/lib/shared.js CHANGED
@@ -10,13 +10,25 @@ import pkg from '../package.json' with { type: 'json' };
10
10
 
11
11
  /**
12
12
  * package.json 包对象(含 name,version,homepage);
13
- * >查看定义:@see {@link PK}、{@link dnsLookup}、{@link dnsResolve}
13
+ * >查看定义:@see {@link PK}
14
14
  */
15
15
  const PK = (({ name, version, homepage }) => ({ name, version, homepage }))(pkg),
16
16
  DNS_TTL = 5 * 60 * 1000, DNS_MAP = new Map();
17
- /** @type {Function} DNS 查找函数 */
17
+ /**
18
+ * @type {Function} DNS 查找函数
19
+ * @param {string} hostname - 要解析的主机名
20
+ * @param {object} options - 解析选项
21
+ * @param {function} callback - 回调函数
22
+ * >查看定义:@see {@link dnsLookup}
23
+ */
18
24
  const dnsLookup = dns.lookup;
19
- /** @type {Function} DNS 解析函数 */
25
+ /**
26
+ * @type {Function} DNS 解析函数
27
+ * @param {string} hostname - 要解析的主机名
28
+ * @param {object} options - 解析选项
29
+ * @param {function} callback - 回调函数
30
+ * >查看定义:@see {@link dnsResolve}
31
+ */
20
32
  const dnsResolve = dns.resolve,
21
33
  /**
22
34
  * @param {number} family - IP地址族(4=IPv4, 6=IPv6)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flun/mailer",
3
- "version": "2.1.6",
3
+ "version": "2.1.7",
4
4
  "description": "A powerful and flexible email sending library for Node.js with multiple transport support (SMTP, SMTP Pool, Sendmail, Stream, JSON, SES)",
5
5
  "type": "module",
6
6
  "exports": {
@@ -75,4 +75,4 @@
75
75
  "example": "examples",
76
76
  "test": "tests"
77
77
  }
78
- }
78
+ }