dsh-qwenwork-connect 0.2.1 → 0.2.2
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/lib/loopback.js +5 -1
- package/package.json +1 -1
package/lib/loopback.js
CHANGED
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
* @module dsh-qwenwork-connect/loopback
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import fs from 'node:fs';
|
|
12
|
+
import os from 'node:os';
|
|
13
|
+
import path from 'node:path';
|
|
14
|
+
|
|
11
15
|
/** 本地插件面可被寻址的环回主机名。 */
|
|
12
16
|
/**
|
|
13
17
|
* 额外信任的 Host(逗号分隔)。DSH 常通过 dsh.lan 之类的反代域名访问,
|
|
@@ -28,7 +32,7 @@ function extraTrustedHosts() {
|
|
|
28
32
|
return new Set(
|
|
29
33
|
parts
|
|
30
34
|
.join(',')
|
|
31
|
-
.split(/[s,]+/)
|
|
35
|
+
.split(/[\s,]+/)
|
|
32
36
|
.map((item) => item.trim().toLowerCase())
|
|
33
37
|
.filter((item) => item.length > 0),
|
|
34
38
|
);
|