work around npm/npx 9 bug https://github.com/npm/cli/issues/6827
Massimo Melina committed
Sep 21, 2023 at 16:31 UTC
6a9c005824e583eca792a80b80f8386952b43626
2 files changed
+3
-3
package.json
+2
-2
@@ -16,7 +16,7 @@
16
"start-frontend": "npm run start --workspace=frontend",
17
"start-admin": "npm run start --workspace=admin",
18
"build-all": "npm audit --omit=dev && rm -rf dist && npm i && npm run build-server && npm run build-frontend && npm run build-admin && echo COMPLETED",
19
- "build-server": "rm -rf dist/src dist/plugins && tsc --target es2018 && touch package.json && cp -v -r package.json README* LICENSE* plugins dist && find dist -name .DS_Store -delete && node afterbuild.js",
19
+ "build-server": "rm -rf dist/src dist/plugins && tsc --target es2018 && touch package.json && cp -v -r package.json central.json README* LICENSE* plugins dist && find dist -name .DS_Store -delete && node afterbuild.js",
20
"build-frontend": "npm run build --workspace=frontend",
21
"build-admin": "npm run build --workspace=admin",
22
"server-for-test": "node dist/src --cwd . --config tests && rm custom.html",
@@ -78,7 +78,7 @@
78
"limiter": "^2.1.0",
79
"lodash": "^4.17.21",
80
"minimist": "^1.2.6",
81
- "nat-upnp": "github:kaden-sharpin/node-nat-upnp",
81
+ "nat-upnp-ts": "^2.0.1",
82
"node-html-parser": "^6.1.5",
83
"open": "^8.4.0",
84
"tssrp6a": "^3.0.0",
src/api.net.ts
+1
-1
@@ -1,7 +1,7 @@
1
// This file is part of HFS - Copyright 2021-2023, Massimo Melina <a@rejetto.com> - License https://www.gnu.org/licenses/gpl-3.0.txt
2
3
import { ApiError, ApiHandlers } from './apiMiddleware'
4
-import { Client } from 'nat-upnp'
4
+import { Client } from 'nat-upnp-ts'
5
import {
6
HTTP_BAD_REQUEST, HTTP_FAILED_DEPENDENCY, HTTP_OK, HTTP_SERVER_ERROR, HTTP_SERVICE_UNAVAILABLE,
7
IS_MAC, IS_WINDOWS