diff --git a/api/package-lock.json b/api/package-lock.json index c9dc3919..24e67599 100644 Binary files a/api/package-lock.json and b/api/package-lock.json differ diff --git a/api/package.json b/api/package.json index 1fe3d574..967c9df8 100644 --- a/api/package.json +++ b/api/package.json @@ -5,8 +5,6 @@ "main": "dist/Server.js", "types": "dist/Server.d.ts", "scripts": { - "link": "npm run build && npm link", - "postinstall": "npm run --prefix ../util/ link && npm link @fosscord/util && npm run link", "test": "jest", "test:watch": "jest --watch", "start": "npm run build && node dist/start", @@ -66,16 +64,16 @@ "require_optional": "^1.0.1" }, "devDependencies": { + "0x": "^4.10.2", "@types/amqplib": "^0.8.1", "@types/bcrypt": "^5.0.0", "@types/express": "^4.17.9", "@types/i18next-node-fs-backend": "^2.1.0", "@types/jsonwebtoken": "^8.5.0", "@types/multer": "^1.4.5", - "@types/node": "^14.14.22", + "@types/node": "^14.17.9", "@types/node-fetch": "^2.5.7", "@zerollup/ts-transform-paths": "^1.7.18", - "0x": "^4.10.2", "caxa": "^2.1.0", "jest": "^26.6.3", "saslprep": "^1.0.3", diff --git a/cdn/package.json b/cdn/package.json index 21976809..0a34f85f 100644 --- a/cdn/package.json +++ b/cdn/package.json @@ -5,8 +5,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { - "link": "npm run build && npm link", - "postinstall": "npm run --prefix ../util/ link && npm link @fosscord/util && npm run link", "test": "echo \"Error: no test specified\" && exit 1", "build": "tsc -b .", "start": "npm run build && node dist/start.js" diff --git a/gateway/package.json b/gateway/package.json index e6c45427..7c9f5678 100644 --- a/gateway/package.json +++ b/gateway/package.json @@ -4,8 +4,6 @@ "description": "", "main": "dist/index.js", "scripts": { - "link": "npm run build && npm link", - "postinstall": "npm run --prefix ../util/ link && npm link @fosscord/util && npm run link", "test": "echo \"Error: no test specified\" && exit 1", "start": "npm run build && node dist/start.js", "build": "tsc -b .", diff --git a/src/index.js b/src/index.js deleted file mode 100644 index cb1b2356..00000000 --- a/src/index.js +++ /dev/null @@ -1 +0,0 @@ -// TODO: start api AND cdn AND gateway \ No newline at end of file diff --git a/util/package-lock.json b/util/package-lock.json new file mode 100644 index 00000000..3bd26d11 Binary files /dev/null and b/util/package-lock.json differ diff --git a/util/package.json b/util/package.json index 5ce97669..082d5cb3 100644 --- a/util/package.json +++ b/util/package.json @@ -5,7 +5,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { - "link": "npm run build && npm link", + "postinstall": "npm run build", "build": "tsc -b ." }, "repository": { @@ -26,10 +26,12 @@ }, "homepage": "https://docs.fosscord.com/", "dependencies": { + "@types/amqplib": "^0.8.1", "@types/jsonwebtoken": "^8.5.0", + "@types/mongodb": "^3.6.9", "@types/mongoose-autopopulate": "^0.10.1", "@types/mongoose-lean-virtuals": "^0.5.1", - "@types/node": "^14.14.25", + "@types/node": "^14.17.9", "ajv": "^8.5.0", "amqplib": "^0.8.0", "dot-prop": "^6.0.1", @@ -40,8 +42,5 @@ "mongoose": "^5.13.7", "mongoose-autopopulate": "^0.12.3", "typescript": "^4.1.3" - }, - "devDependencies": { - "@types/amqplib": "^0.8.1" } } diff --git a/util/src/util/MongoBigInt.ts b/util/src/util/MongoBigInt.ts index fc451925..5148b742 100644 --- a/util/src/util/MongoBigInt.ts +++ b/util/src/util/MongoBigInt.ts @@ -41,7 +41,7 @@ class LongSchema extends mongoose.SchemaType { if (type === "handle" || init == false) return val; return BigInt(val.toString()); } - if (val instanceof Number || "number" == typeof val) return BigInt(val); + if (val instanceof Number || "number" == typeof val) return BigInt(val as number); if (!Array.isArray(val) && val.toString) return BigInt(val.toString()); //@ts-ignore diff --git a/util/src/util/toBigInt.ts b/util/src/util/toBigInt.ts index d57c4568..b7985928 100644 --- a/util/src/util/toBigInt.ts +++ b/util/src/util/toBigInt.ts @@ -1,3 +1,4 @@ -export default function toBigInt(string: String): BigInt { +export default function toBigInt(string: string): bigint { return BigInt(string); } + diff --git a/webrtc/package.json b/webrtc/package.json index 8163ac57..54c043ee 100644 --- a/webrtc/package.json +++ b/webrtc/package.json @@ -4,7 +4,6 @@ "description": "A javascript fosscord webrtc server for voice and video communication", "main": "index.js", "scripts": { - "postinstall": "npm link @fosscord/util", "test": "npm run build && node dist/test.js", "build": "tsc -b .", "start": "npm run build && node dist/start.js"