hfs 0.52.9 → 0.52.10

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hfs",
3
- "version": "0.52.9",
3
+ "version": "0.52.10",
4
4
  "description": "HTTP File Server",
5
5
  "keywords": [
6
6
  "file server",
File without changes
package/src/const.js CHANGED
@@ -45,7 +45,7 @@ exports.DEV = process.env.DEV || exports.argv.dev ? 'DEV' : '';
45
45
  exports.ORIGINAL_CWD = process.cwd();
46
46
  exports.HFS_STARTED = new Date();
47
47
  const PKG_PATH = (0, path_1.join)(__dirname, '..', 'package.json');
48
- exports.BUILD_TIMESTAMP = "2024-06-11T12:54:37.285Z";
48
+ exports.BUILD_TIMESTAMP = "2024-07-03T21:53:36.124Z";
49
49
  const pkg = JSON.parse(fs.readFileSync(PKG_PATH, 'utf8'));
50
50
  exports.VERSION = pkg.version;
51
51
  exports.RUNNING_BETA = exports.VERSION.includes('-');
package/src/upload.js CHANGED
@@ -107,7 +107,7 @@ function uploadWriter(base, path, ctx) {
107
107
  if (err)
108
108
  console.error("couldn't rename temp to", dest, String(err));
109
109
  else if (ctx.query.comment)
110
- (0, comments_1.setCommentFor)(dest, (0, misc_1.escapeHTML)(String(ctx.query.comment)));
110
+ (0, comments_1.setCommentFor)(dest, String(ctx.query.comment));
111
111
  if (resumable)
112
112
  delayedDelete(resumable, 0);
113
113
  });
package/src/util-os.js CHANGED
@@ -23,7 +23,7 @@ function getDiskSpaceSync(path) {
23
23
  }
24
24
  while (path && !(0, fs_1.existsSync)(path))
25
25
  path = (0, path_1.dirname)(path);
26
- const out = (0, misc_1.try_)(() => (0, child_process_1.execSync)(`df -k "${path}"`).toString(), err => { throw err.status === 1 ? Error('miss') : err.status === 127 ? Error('unsupported') : err; });
26
+ const out = (0, misc_1.try_)(() => (0, child_process_1.spawnSync)('df', ['-k', path]).stdout.toString(), err => { throw err.status === 1 ? Error('miss') : err.status === 127 ? Error('unsupported') : err; });
27
27
  if (!(out === null || out === void 0 ? void 0 : out.startsWith('Filesystem')))
28
28
  throw Error('unsupported');
29
29
  const one = out.split('\n')[1];