hfs 3.0.2-beta0.1 → 3.0.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/plugins.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hfs",
3
- "version": "3.0.2-beta0.1",
3
+ "version": "3.0.2",
4
4
  "description": "HTTP File Server",
5
5
  "keywords": ["file server", "http server"],
6
6
  "homepage": "https://rejetto.com/hfs",
@@ -95,7 +95,7 @@
95
95
  "lodash": "^4.17.21",
96
96
  "mime-types": "*",
97
97
  "minimist": "^1.2.8",
98
- "nat-upnp-rejetto": "^2.1.1",
98
+ "nat-upnp-rejetto": "^2.1.2",
99
99
  "node-forge": "^1.3.1",
100
100
  "open": "^8.4.0",
101
101
  "picomatch": "^4.0.3",
package/src/plugins.js CHANGED
@@ -364,7 +364,7 @@ const serverCode = (0, config_1.defineConfig)('server_code', '', async (script,
364
364
  catch { }
365
365
  const res = {};
366
366
  try {
367
- new Function('exports', script)(res); // parse
367
+ new Function('exports,require', script)(res, require); // parse
368
368
  await initPlugin(res);
369
369
  res.getCustomHtml = () => (0, misc_1.callable)(res.customHtml) || {};
370
370
  return new Plugin(exports.SERVER_CODE_ID, '', res, lodash_1.default.noop);