{
  "name": "hfs",
  "version": "3.1.4",
  "description": "HTTP File Server",
  "keywords": [
    "file server",
    "http server"
  ],
  "homepage": "https://rejetto.com/hfs",
  "license": "GPL-3.0",
  "author": "Massimo Melina <a@rejetto.com>",
  "scripts": {
    "watch-server": "cross-env DEV=1 nodemon --ignore tests/ --watch src -e ts,tsx --exec tsx src",
    "watch-server-proxied": "cross-env FRONTEND_PROXY=3005 ADMIN_PROXY=3006 npm run watch-server",
    "watch-server-full": "npm run start --workspace=frontend & npm run start --workspace=admin & cross-env FRONTEND_PROXY=3005 ADMIN_PROXY=3006 npm run watch-server",
    "start-frontend": "npm run start --workspace=frontend",
    "start-admin": "npm run start --workspace=admin",
    "build-all": "rm -rf dist && npm run build-server && (npm run build-frontend & npm run build-admin) && echo COMPLETED",
    "build-server": "rm -rf dist/src dist/plugins && npm i && tsc && touch package.json && cp -v -r package.json central.json README* LICENSE* hfs.ico plugins dist && find dist -name .DS_Store -o -name storage -exec rm -rf {} + && node scripts/afterbuild.js",
    "build-frontend": "npm run build --workspace=frontend",
    "build-admin": "npm run build --workspace=admin",
    "server-for-test": "node dist/src --cwd tests/work --config tests --debug",
    "server-for-test-dev": "cross-env DEV=1 FRONTEND_PROXY=3005 ADMIN_PROXY=3006 nodemon --ignore tests/ --watch src -e ts,tsx --exec tsx src -- --cwd tests/work --config tests",
    "test": "node --import tsx --test tests/test.ts",
    "test-with-server": "sh -c 'npm run port-is-free && tsc && rm -rf tests/work tests/tmp && (node dist/src --cwd tests/work --config tests & echo $! > .server_pid) && sleep 2 && node --import tsx --test \"$@\" tests/test.ts; _exit=$?; if [ -f ./.server_pid ]; then SERVER_PID=$(cat ./.server_pid); kill \"$SERVER_PID\" 2>/dev/null || true; rm -f ./.server_pid; fi; exit $_exit' --",
    "port-is-free": "node -e \"const port=process.argv[1]||8081;process.exit(await fetch('http://localhost:'+port).then(() => console.log('BUSY')||1, () => 0))\" --",
    "test-ui": "npm run port-is-free -- 8081 && rm -rf tests/work tests/work2 && npx playwright test frontend && npx playwright test serial && npx playwright test admin-vfs",
    "test-with-ui": "sh -c 'npm run port-is-free -- 3005 && npm run start-frontend & npm run port-is-free -- 3006 && npm run start-admin & cross-env TEST_WITH_UI=1 npx playwright test --ui \"$@\"' --",
    "pub": "cd dist && npm publish",
    "dist": "STASHED=; if ! git diff-index --quiet HEAD --; then git stash push -m 'dist' && STASHED=1; fi; CI=1 FORCE_COLOR=1 npm run dist-uncommitted || (EXIT_CODE=$?; [ -n \"$STASHED\" ] && git stash pop; exit $EXIT_CODE); [ -n \"$STASHED\" ] && git stash pop",
    "dist-uncommitted": "npm audit --omit=dev --audit-level=moderate && rm -rf dist && npm run build-server && npm run test-with-server && (npm run build-frontend & npm run build-admin) && npm run test-ui && npm run dist-bin",
    "dist-bin": "npm run dist-modules && npm run dist-bin-win && npm run dist-bin-linux && npm run dist-bin-linux-arm && npm run dist-bin-mac && npm run dist-bin-mac-arm",
    "dist-modules": "cp package.json central.json README.md dist && cd dist && npm pkg delete devDependencies workspaces && rm -rf node_modules && npm install --omit=dev && npm shrinkwrap && cd .. && node scripts/prune_modules.js",
    "dist-bin-win": "cd dist && pkg . --public -C gzip -t node20-win-x64 && npx resedit-cli --in hfs.exe --icon 1,../hfs.ico --out hfs.exe && zip hfs-windows-x64-$(jq -r .version ../package.json).zip hfs.exe -r plugins && cd ..",
    "dist-bin-mac-arm": "cd dist && pkg . --public -C gzip -t node20-macos-arm64 && zip hfs-mac-arm64-$(jq -r .version ../package.json).zip hfs -r plugins && cd ..",
    "dist-bin-mac": "cd dist && pkg . --public -C gzip -t node20-macos-x64 && zip hfs-mac-x64-$(jq -r .version ../package.json).zip hfs -r plugins && cd ..",
    "dist-bin-linux": "cd dist && pkg . --public -C gzip -t node20-linux-x64 && zip hfs-linux-x64-$(jq -r .version ../package.json).zip hfs -r plugins && cd ..",
    "dist-bin-linux-arm": "cd dist && pkg . --public -C gzip -t node20-linux-arm64 ${GITHUB_ACTIONS:+--public-packages \"*\"} && zip hfs-linux-arm64-$(jq -r .version ../package.json).zip hfs -r plugins && cd ..",
    "dist-win": "npm run dist-modules && npm run dist-bin-win",
    "dist-mac-arm": "npm run dist-modules && npm run dist-bin-mac-arm",
    "dist-mac": "npm run dist-modules && npm run dist-bin-mac",
    "dist-linux": "npm run dist-modules && npm run dist-bin-linux",
    "dist-node": "npm run dist-modules && cd dist && zip hfs-node-$(jq -r .version ../package.json).zip -r * -x *.zip *.exe hfs-* *.log logs"
  },
  "engines": {
    "node": ">=18.15.0"
  },
  "files": [
    "central.json",
    "npm-shrinkwrap.json",
    "src/*",
    "admin/*",
    "frontend/*",
    "plugins/*"
  ],
  "repository": {
    "type": "git",
    "url": "git+https://github.com/rejetto/hfs.git"
  },
  "bin": {
    "hfs": "src/index.js"
  },
  "pkg": {
    "assets": [
      "central.json",
      "src/statWorker.js",
      "admin/**/*",
      "frontend/**/*",
      "**/node_modules/fswin/x64/*",
      "**/node_modules/axios/dist/node/*",
      "**/node_modules/buffers/**",
      "**/node_modules/binary/**",
      "**/node_modules/unzip-stream/**"
    ],
    "targets": [
      "node20-win-x64",
      "node20-mac-x64",
      "node20-mac-arm64",
      "node20-linux-x64",
      "node20-linux-arm64"
    ]
  },
  "dependencies": {
    "@gregoranders/csv": "^0.0.13",
    "@rejetto/kvstorage": "^0.17.7",
    "@rejetto/nat-upnp": "^2.1.3",
    "acme-client": "^5.4.0",
    "busboy": "^1.6.0",
    "crc-32": "^1.2.2",
    "fast-glob": "^3.3.3",
    "fast-xml-parser": "^5.4.2",
    "find-process": "^2.0.0",
    "fs-x-attributes": "^1.0.2",
    "fswin": "^3.24.829",
    "iconv-lite": "^0.7.0",
    "immer": "^10.1.3",
    "ip2location-nodejs": "^9.7.0",
    "koa": "^3.1.2",
    "koa-compress": "^5.2.0",
    "koa-mount": "^4.2.0",
    "koa-session": "^7.0.2",
    "limiter": "^3.0.0",
    "lodash": "^4.17.21",
    "mime-types": "*",
    "minimist": "^1.2.8",
    "node-forge": "^1.3.1",
    "open": "^8.4.0",
    "picomatch": "^4.0.3",
    "tssrp6a": "^3.0.0",
    "unzip-stream": "^0.3.4",
    "valtio": "^1.13.2",
    "xxhashjs": "^0.2.2",
    "yaml": "^2.8.1"
  }
}
