hfs 0.55.0-rc5 → 0.55.1
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/package.json +2 -1
- package/src/const.js +13 -6
- package/src/langs/hfs-lang-vi.json +8 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hfs",
|
|
3
|
-
"version": "0.55.
|
|
3
|
+
"version": "0.55.1",
|
|
4
4
|
"description": "HTTP File Server",
|
|
5
5
|
"keywords": ["file server", "http server"],
|
|
6
6
|
"homepage": "https://rejetto.com/hfs",
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
"fs-x-attributes": "^1.0.2",
|
|
80
80
|
"fswin": "^3.24.829",
|
|
81
81
|
"iconv-lite": "^0.6.3",
|
|
82
|
+
"immer": "^9.0.21",
|
|
82
83
|
"ip2location-nodejs": "^9.6.0",
|
|
83
84
|
"koa": "^2.15.3",
|
|
84
85
|
"koa-compress": "^5.1.0",
|
package/src/const.js
CHANGED
|
@@ -54,7 +54,7 @@ exports.DEV = process.env.DEV || exports.argv.dev ? 'DEV' : '';
|
|
|
54
54
|
exports.ORIGINAL_CWD = process.cwd();
|
|
55
55
|
exports.HFS_STARTED = new Date();
|
|
56
56
|
const PKG_PATH = (0, path_1.join)(__dirname, '..', 'package.json');
|
|
57
|
-
exports.BUILD_TIMESTAMP = "
|
|
57
|
+
exports.BUILD_TIMESTAMP = "2025-01-01T17:07:20.752Z";
|
|
58
58
|
const pkg = JSON.parse(fs.readFileSync(PKG_PATH, 'utf8'));
|
|
59
59
|
exports.VERSION = pkg.version;
|
|
60
60
|
exports.RUNNING_BETA = exports.VERSION.includes('-');
|
|
@@ -76,7 +76,6 @@ console.log('started', (0, cross_1.formatTimestamp)(exports.HFS_STARTED), export
|
|
|
76
76
|
console.log('version', exports.VERSION || '-');
|
|
77
77
|
console.log('build', exports.BUILD_TIMESTAMP || '-');
|
|
78
78
|
console.debug('arguments', exports.argv);
|
|
79
|
-
const winExe = exports.IS_WINDOWS && process.execPath.match(/(?<!node)\.exe$/i);
|
|
80
79
|
// still considering whether to use ".hfs" with Windows users, who may be less accustomed to it
|
|
81
80
|
const dir = exports.argv.cwd || useHomeDir() && (0, path_1.join)((0, os_1.homedir)(), '.hfs');
|
|
82
81
|
if (dir) {
|
|
@@ -99,12 +98,20 @@ if (bun)
|
|
|
99
98
|
console.log('platform', process.platform, process.arch, exports.IS_BINARY ? 'binary' : (0, path_1.basename)(process.execPath));
|
|
100
99
|
console.log('pid', process.pid);
|
|
101
100
|
function useHomeDir() {
|
|
102
|
-
if (!
|
|
101
|
+
if (!exports.IS_WINDOWS || !exports.IS_BINARY)
|
|
103
102
|
return true;
|
|
104
103
|
try {
|
|
105
|
-
fs.accessSync(
|
|
104
|
+
fs.accessSync(exports.CONFIG_FILE, fs.constants.W_OK);
|
|
106
105
|
}
|
|
107
|
-
catch (
|
|
108
|
-
|
|
106
|
+
catch (e) {
|
|
107
|
+
if (e.code !== 'ENOENT')
|
|
108
|
+
return true;
|
|
109
|
+
try {
|
|
110
|
+
fs.writeFileSync(exports.CONFIG_FILE, ''); // not found, try to create
|
|
111
|
+
fs.unlinkSync(exports.CONFIG_FILE);
|
|
112
|
+
}
|
|
113
|
+
catch (_a) {
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
109
116
|
}
|
|
110
117
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "thenoppy12 (Nguyễn Văn Ngu)",
|
|
3
|
-
"version": 2.
|
|
4
|
-
"hfs_version": "0.
|
|
3
|
+
"version": 2.6,
|
|
4
|
+
"hfs_version": "0.55.0",
|
|
5
5
|
"translate": {
|
|
6
6
|
"Select": "Chọn",
|
|
7
7
|
"n_files": "{n,plural,one{# tập tin} other{# tập tin}}",
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
"Close": "Đóng",
|
|
144
144
|
"Folder": "Thư mục",
|
|
145
145
|
"Web page": "Trang web",
|
|
146
|
-
"Link": "
|
|
146
|
+
"Link": "Đường dẫn",
|
|
147
147
|
"Auto-play": "Tự động phát",
|
|
148
148
|
"autoplay_seconds": "Số giây chờ ảnh",
|
|
149
149
|
"Select all": "Chọn hết",
|
|
@@ -164,6 +164,10 @@
|
|
|
164
164
|
"Show details": "Chi tiết",
|
|
165
165
|
"upload_conflict": "đang tồn tại",
|
|
166
166
|
"Logged in": "Đã đăng nhập!",
|
|
167
|
-
"Logged out": "Đã đăng xuất!"
|
|
167
|
+
"Logged out": "Đã đăng xuất!",
|
|
168
|
+
"Cancel": "Huỷ bỏ",
|
|
169
|
+
"allow_session_ip_change": "Cho phép đổi IP trong phiên này",
|
|
170
|
+
"focus_hint": "Bằng cách nhập nhanh lên bàn phím, có thể tìm và xem các phần tử trong danh sách",
|
|
171
|
+
"copy_links": "Copy đường dẫn"
|
|
168
172
|
}
|
|
169
173
|
}
|