diff --git a/build-linux.sh b/build-linux.sh old mode 100644 new mode 100755 index c0058e1..ba53d5c --- a/build-linux.sh +++ b/build-linux.sh @@ -7,6 +7,8 @@ regex='VERSION = '"'"'([a-z0-9.]*)'"'"'' VERSION=${BASH_REMATCH[1]} +export NODE_OPTIONS=--openssl-legacy-provider + echo "Building Version $VERSION for Linux" echo "NPM Install" diff --git a/package-lock.json b/package-lock.json index 1c09d96..a8e782a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "@types/ini": "^1.3.30", "@types/lodash": "^4.14.153", "@types/multer": "^1.4.4", - "@types/node": "^13.13.48", + "@types/node": "^16.18.126", "@types/pretty-bytes": "^5.2.0", "@types/pug": "^2.0.4", "@types/showdown": "^1.9.3", @@ -53,6 +53,9 @@ "typedoc": "^0.22.15", "typescript": "^4.2.3", "winston": "^3.2.1" + }, + "engines": { + "node": ">=16" } }, "node_modules/@babel/code-frame": { @@ -408,9 +411,10 @@ } }, "node_modules/@types/node": { - "version": "13.13.52", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.52.tgz", - "integrity": "sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==" + "version": "16.18.126", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.126.tgz", + "integrity": "sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw==", + "license": "MIT" }, "node_modules/@types/pretty-bytes": { "version": "5.2.0", @@ -4081,7 +4085,6 @@ "version": "4.7.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -4675,9 +4678,9 @@ } }, "@types/node": { - "version": "13.13.52", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.52.tgz", - "integrity": "sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==" + "version": "16.18.126", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.126.tgz", + "integrity": "sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw==" }, "@types/pretty-bytes": { "version": "5.2.0", @@ -7390,8 +7393,7 @@ "typescript": { "version": "4.7.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", - "peer": true + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==" }, "uid-safe": { "version": "2.1.5", diff --git a/package.json b/package.json index 85b720d..78fab66 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,9 @@ "version": "0.0.1", "description": "KONMAI FUN TIME", "main": "./build/index.js", + "engines" : { + "node" : ">=16" + }, "dependencies": { "@seald-io/nedb": "^4.0.2", "@types/argparse": "^1.0.38", @@ -15,7 +18,7 @@ "@types/ini": "^1.3.30", "@types/lodash": "^4.14.153", "@types/multer": "^1.4.4", - "@types/node": "^13.13.48", + "@types/node": "^16.18.126", "@types/pretty-bytes": "^5.2.0", "@types/pug": "^2.0.4", "@types/showdown": "^1.9.3", @@ -42,12 +45,12 @@ "prettier": "^2.0.5", "pretty-bytes": "^5.6.0", "pug": "^3.0.2", + "resedit-cli": "^2.0.0", "showdown": "^1.9.1", "sizeof": "^1.0.0", "ts-node": "^9.1.1", "typedoc": "^0.22.15", "typescript": "^4.2.3", - "winston": "^3.2.1", - "resedit-cli": "^2.0.0" + "winston": "^3.2.1" } -} \ No newline at end of file +} diff --git a/src/utils/EamuseIO.ts b/src/utils/EamuseIO.ts index 2aa289b..db71893 100644 --- a/src/utils/EamuseIO.ts +++ b/src/utils/EamuseIO.ts @@ -1,4 +1,4 @@ -import { existsSync, mkdirSync, readFileSync, writeFile, readFile, readdir, unlink } from 'fs'; +import { existsSync, mkdirSync, readFileSync, writeFile, readFile, readdir, unlink, WriteFileOptions } from 'fs'; import { Logger } from './Logger'; import path from 'path'; @@ -161,7 +161,7 @@ export async function WriteFile( plugin: PluginDetect, file: string, data: string | Buffer, - options: { encoding?: string | null; mode?: number | string; flag?: string } | string | null + options: WriteFileOptions ) { const target = path.resolve(PLUGIN_PATH, plugin.identifier, file); @@ -202,7 +202,7 @@ export async function DeleteFile(plugin: PluginDetect, file: string) { export async function ReadFile( plugin: PluginDetect, file: string, - options: { encoding?: string | null; flag?: string } | string | undefined | null + options: { encoding?: BufferEncoding | null; flag?: string } | BufferEncoding | undefined | null ) { const target = path.resolve(PLUGIN_PATH, plugin.identifier, file); diff --git a/tsconfig.json b/tsconfig.json index 5e88dc3..90921ec 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,13 @@ { "compilerOptions": { - "module": "commonjs", + "module": "node16", "esModuleInterop": true, "allowSyntheticDefaultImports": true, "experimentalDecorators": true, "emitDecoratorMetadata": true, - "target": "es2017", + "target": "es2021", "noImplicitAny": true, - "moduleResolution": "node", + "moduleResolution": "node16", "sourceMap": true, "outDir": "dist", "rootDir": "src"