hfs 0.45.0-alpha3 → 0.45.0-alpha4
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as OF,c as UF}from"./index-
|
|
1
|
+
import{g as OF,c as UF}from"./index-4149cc3b.js";function gF(sF,hF){for(var eF=0;eF<hF.length;eF++){const tF=hF[eF];if(typeof tF!="string"&&!Array.isArray(tF)){for(const w in tF)if(w!=="default"&&!(w in sF)){const lF=Object.getOwnPropertyDescriptor(tF,w);lF&&Object.defineProperty(sF,w,lF.get?lF:{enumerable:!0,get:()=>tF[w]})}}}return Object.freeze(Object.defineProperty(sF,Symbol.toStringTag,{value:"Module"}))}var dF={exports:{}};/*
|
|
2
2
|
* [js-sha512]{@link https://github.com/emn178/js-sha512}
|
|
3
3
|
*
|
|
4
4
|
* @version 0.8.0
|
package/admin/index.html
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<title>HFS Admin</title>
|
|
8
8
|
|
|
9
9
|
<link rel="icon" type="image/svg+xml" href="/hfs-logo-icon.svg" />
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-4149cc3b.js"></script>
|
|
11
11
|
<link rel="stylesheet" href="/assets/index-35f6e3dc.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
package/package.json
CHANGED
package/src/const.js
CHANGED
|
@@ -38,7 +38,7 @@ exports.DEV = process.env.DEV || exports.argv.dev ? 'DEV' : '';
|
|
|
38
38
|
exports.ORIGINAL_CWD = process.cwd();
|
|
39
39
|
exports.HFS_STARTED = new Date();
|
|
40
40
|
const PKG_PATH = (0, path_1.join)(__dirname, '..', 'package.json');
|
|
41
|
-
exports.BUILD_TIMESTAMP = "2023-05-
|
|
41
|
+
exports.BUILD_TIMESTAMP = "2023-05-08T13:03:00.101Z";
|
|
42
42
|
const pkg = JSON.parse(fs.readFileSync(PKG_PATH, 'utf8'));
|
|
43
43
|
exports.VERSION = pkg.version;
|
|
44
44
|
exports.DAY = 86400000;
|
|
@@ -81,7 +81,6 @@ console.log('started', exports.HFS_STARTED.toLocaleString(), exports.DEV);
|
|
|
81
81
|
console.log('version', exports.VERSION || '-');
|
|
82
82
|
console.log('build', exports.BUILD_TIMESTAMP || '-');
|
|
83
83
|
console.log('pid', process.pid);
|
|
84
|
-
console.debug('exec', process.execPath);
|
|
85
84
|
const winExe = exports.IS_WINDOWS && process.execPath.match(/(?<!node)\.exe$/i);
|
|
86
85
|
if (exports.argv.cwd)
|
|
87
86
|
process.chdir(exports.argv.cwd);
|
package/src/misc.js
CHANGED
|
@@ -180,16 +180,16 @@ function isLocalHost(c) {
|
|
|
180
180
|
}
|
|
181
181
|
exports.isLocalHost = isLocalHost;
|
|
182
182
|
function makeNetMatcher(mask, emptyMaskReturns = false) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
183
|
+
var _a;
|
|
184
|
+
if (!mask)
|
|
185
|
+
return () => emptyMaskReturns;
|
|
186
|
+
if (!mask.includes('/'))
|
|
187
|
+
return makeMatcher(mask);
|
|
188
|
+
const all = mask.split('|');
|
|
189
|
+
const neg = ((_a = all[0]) === null || _a === void 0 ? void 0 : _a[0]) === '!';
|
|
190
|
+
if (neg)
|
|
191
|
+
all[0] = all[0].slice(1);
|
|
192
|
+
return (ip) => neg !== all.some(x => cidr_tools_1.default.contains(x, ip));
|
|
193
193
|
}
|
|
194
194
|
exports.makeNetMatcher = makeNetMatcher;
|
|
195
195
|
function makeMatcher(mask, emptyMaskReturns = false) {
|