🐛 fix bundle postinstall

This commit is contained in:
Flam3rboy 2021-08-15 22:32:57 +02:00
parent 94a5d56412
commit 04355a6661
8 changed files with 49 additions and 18 deletions

View File

@ -5,6 +5,7 @@
"main": "dist/Server.js", "main": "dist/Server.js",
"types": "dist/Server.d.ts", "types": "dist/Server.d.ts",
"scripts": { "scripts": {
"postinstall": "npm run build",
"test": "jest", "test": "jest",
"test:watch": "jest --watch", "test:watch": "jest --watch",
"start": "npm run build && node dist/start", "start": "npm run build && node dist/start",

View File

@ -7,6 +7,7 @@
"": { "": {
"name": "@fosscord/server", "name": "@fosscord/server",
"version": "1.0.0", "version": "1.0.0",
"hasInstallScript": true,
"license": "AGPLV3", "license": "AGPLV3",
"dependencies": { "dependencies": {
"@fosscord/api": "file:../api", "@fosscord/api": "file:../api",
@ -20,6 +21,7 @@
}, },
"devDependencies": { "devDependencies": {
"@types/amqplib": "^0.8.1", "@types/amqplib": "^0.8.1",
"@types/async-exit-hook": "^2.0.0",
"@types/bcrypt": "^5.0.0", "@types/bcrypt": "^5.0.0",
"@types/express": "^4.17.9", "@types/express": "^4.17.9",
"@types/i18next-node-fs-backend": "^2.1.0", "@types/i18next-node-fs-backend": "^2.1.0",
@ -30,6 +32,7 @@
"@types/multer": "^1.4.5", "@types/multer": "^1.4.5",
"@types/node": "^14.17.9", "@types/node": "^14.17.9",
"@types/node-fetch": "^2.5.7", "@types/node-fetch": "^2.5.7",
"@types/node-os-utils": "^1.2.0",
"@types/uuid": "^8.3.0", "@types/uuid": "^8.3.0",
"@types/ws": "^7.4.0", "@types/ws": "^7.4.0",
"@zerollup/ts-transform-paths": "^1.7.18", "@zerollup/ts-transform-paths": "^1.7.18",
@ -39,6 +42,7 @@
"../api": { "../api": {
"name": "@fosscord/api", "name": "@fosscord/api",
"version": "1.0.0", "version": "1.0.0",
"hasInstallScript": true,
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@fosscord/util": "file:../util", "@fosscord/util": "file:../util",
@ -61,7 +65,7 @@
"i18next-node-fs-backend": "^2.1.3", "i18next-node-fs-backend": "^2.1.3",
"jsonwebtoken": "^8.5.1", "jsonwebtoken": "^8.5.1",
"lambert-server": "^1.2.8", "lambert-server": "^1.2.8",
"missing-native-js-functions": "^1.2.6", "missing-native-js-functions": "^1.2.10",
"mongoose": "^5.12.3", "mongoose": "^5.12.3",
"mongoose-autopopulate": "^0.12.3", "mongoose-autopopulate": "^0.12.3",
"mongoose-long": "^0.3.2", "mongoose-long": "^0.3.2",
@ -75,6 +79,7 @@
"@types/i18next-node-fs-backend": "^2.1.0", "@types/i18next-node-fs-backend": "^2.1.0",
"@types/jsonwebtoken": "^8.5.0", "@types/jsonwebtoken": "^8.5.0",
"@types/mongodb": "^3.6.9", "@types/mongodb": "^3.6.9",
"@types/mongoose": "^5.10.5",
"@types/mongoose-autopopulate": "^0.10.1", "@types/mongoose-autopopulate": "^0.10.1",
"@types/mongoose-lean-virtuals": "^0.5.1", "@types/mongoose-lean-virtuals": "^0.5.1",
"@types/multer": "^1.4.5", "@types/multer": "^1.4.5",
@ -94,6 +99,7 @@
"../cdn": { "../cdn": {
"name": "@fosscord/cdn", "name": "@fosscord/cdn",
"version": "1.0.0", "version": "1.0.0",
"hasInstallScript": true,
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@fosscord/util": "file:../util", "@fosscord/util": "file:../util",
@ -109,7 +115,7 @@
"image-size": "^1.0.0", "image-size": "^1.0.0",
"lambert-db": "^1.2.3", "lambert-db": "^1.2.3",
"lambert-server": "^1.2.8", "lambert-server": "^1.2.8",
"missing-native-js-functions": "^1.0.8", "missing-native-js-functions": "^1.2.10",
"multer": "^1.4.2", "multer": "^1.4.2",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.1",
"typescript": "^4.1.2", "typescript": "^4.1.2",
@ -135,6 +141,7 @@
"../gateway": { "../gateway": {
"name": "@fosscord/gateway", "name": "@fosscord/gateway",
"version": "1.0.0", "version": "1.0.0",
"hasInstallScript": true,
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@fosscord/util": "file:../util", "@fosscord/util": "file:../util",
@ -143,7 +150,7 @@
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"jsonwebtoken": "^8.5.1", "jsonwebtoken": "^8.5.1",
"lambert-server": "^1.2.8", "lambert-server": "^1.2.8",
"missing-native-js-functions": "^1.2.3", "missing-native-js-functions": "^1.2.10",
"mongoose-autopopulate": "^0.12.3", "mongoose-autopopulate": "^0.12.3",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.1",
"uuid": "^8.3.2", "uuid": "^8.3.2",
@ -174,7 +181,7 @@
"dot-prop": "^6.0.1", "dot-prop": "^6.0.1",
"env-paths": "^2.2.1", "env-paths": "^2.2.1",
"jsonwebtoken": "^8.5.1", "jsonwebtoken": "^8.5.1",
"missing-native-js-functions": "^1.2.2", "missing-native-js-functions": "^1.2.10",
"mongodb": "^3.6.9", "mongodb": "^3.6.9",
"mongoose": "^5.13.7", "mongoose": "^5.13.7",
"mongoose-autopopulate": "^0.12.3", "mongoose-autopopulate": "^0.12.3",
@ -229,6 +236,12 @@
"@types/node": "*" "@types/node": "*"
} }
}, },
"node_modules/@types/async-exit-hook": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@types/async-exit-hook/-/async-exit-hook-2.0.0.tgz",
"integrity": "sha512-RNjIyjnVZdcP5a1zeIPb5c0hq2nbJc/NOCLNKUAqeCw+J5z2zMcINISn9wybCWhczHnUu3VSUFy7ZCO6ir4ZRw==",
"dev": true
},
"node_modules/@types/bcrypt": { "node_modules/@types/bcrypt": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/@types/bcrypt/-/bcrypt-5.0.0.tgz", "resolved": "https://registry.npmjs.org/@types/bcrypt/-/bcrypt-5.0.0.tgz",
@ -382,6 +395,12 @@
"form-data": "^3.0.0" "form-data": "^3.0.0"
} }
}, },
"node_modules/@types/node-os-utils": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@types/node-os-utils/-/node-os-utils-1.2.0.tgz",
"integrity": "sha512-sstDo2s8gQR/Qh2Bd6yNQ5xJv+D4ttyB9ZVjB3mBm3VkGl2RoqjV7fiw9mIHLbshHSRm2m8uf0XrIRQNWB/z6A==",
"dev": true
},
"node_modules/@types/qs": { "node_modules/@types/qs": {
"version": "6.9.7", "version": "6.9.7",
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
@ -1854,6 +1873,7 @@
"@types/i18next-node-fs-backend": "^2.1.0", "@types/i18next-node-fs-backend": "^2.1.0",
"@types/jsonwebtoken": "^8.5.0", "@types/jsonwebtoken": "^8.5.0",
"@types/mongodb": "^3.6.9", "@types/mongodb": "^3.6.9",
"@types/mongoose": "^5.10.5",
"@types/mongoose-autopopulate": "^0.10.1", "@types/mongoose-autopopulate": "^0.10.1",
"@types/mongoose-lean-virtuals": "^0.5.1", "@types/mongoose-lean-virtuals": "^0.5.1",
"@types/multer": "^1.4.5", "@types/multer": "^1.4.5",
@ -1883,7 +1903,7 @@
"jest": "^26.6.3", "jest": "^26.6.3",
"jsonwebtoken": "^8.5.1", "jsonwebtoken": "^8.5.1",
"lambert-server": "^1.2.8", "lambert-server": "^1.2.8",
"missing-native-js-functions": "^1.2.6", "missing-native-js-functions": "^1.2.10",
"mongoose": "^5.12.3", "mongoose": "^5.12.3",
"mongoose-autopopulate": "^0.12.3", "mongoose-autopopulate": "^0.12.3",
"mongoose-long": "^0.3.2", "mongoose-long": "^0.3.2",
@ -1925,7 +1945,7 @@
"image-size": "^1.0.0", "image-size": "^1.0.0",
"lambert-db": "^1.2.3", "lambert-db": "^1.2.3",
"lambert-server": "^1.2.8", "lambert-server": "^1.2.8",
"missing-native-js-functions": "^1.0.8", "missing-native-js-functions": "^1.2.10",
"multer": "^1.4.2", "multer": "^1.4.2",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.1",
"typescript": "^4.1.2", "typescript": "^4.1.2",
@ -1950,7 +1970,7 @@
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"jsonwebtoken": "^8.5.1", "jsonwebtoken": "^8.5.1",
"lambert-server": "^1.2.8", "lambert-server": "^1.2.8",
"missing-native-js-functions": "^1.2.3", "missing-native-js-functions": "^1.2.10",
"mongoose-autopopulate": "^0.12.3", "mongoose-autopopulate": "^0.12.3",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.1",
"ts-node-dev": "^1.1.6", "ts-node-dev": "^1.1.6",
@ -1974,7 +1994,7 @@
"dot-prop": "^6.0.1", "dot-prop": "^6.0.1",
"env-paths": "^2.2.1", "env-paths": "^2.2.1",
"jsonwebtoken": "^8.5.1", "jsonwebtoken": "^8.5.1",
"missing-native-js-functions": "^1.2.2", "missing-native-js-functions": "^1.2.10",
"mongodb": "^3.6.9", "mongodb": "^3.6.9",
"mongoose": "^5.13.7", "mongoose": "^5.13.7",
"mongoose-autopopulate": "^0.12.3", "mongoose-autopopulate": "^0.12.3",
@ -1992,6 +2012,12 @@
"@types/node": "*" "@types/node": "*"
} }
}, },
"@types/async-exit-hook": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@types/async-exit-hook/-/async-exit-hook-2.0.0.tgz",
"integrity": "sha512-RNjIyjnVZdcP5a1zeIPb5c0hq2nbJc/NOCLNKUAqeCw+J5z2zMcINISn9wybCWhczHnUu3VSUFy7ZCO6ir4ZRw==",
"dev": true
},
"@types/bcrypt": { "@types/bcrypt": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/@types/bcrypt/-/bcrypt-5.0.0.tgz", "resolved": "https://registry.npmjs.org/@types/bcrypt/-/bcrypt-5.0.0.tgz",
@ -2145,6 +2171,12 @@
"form-data": "^3.0.0" "form-data": "^3.0.0"
} }
}, },
"@types/node-os-utils": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@types/node-os-utils/-/node-os-utils-1.2.0.tgz",
"integrity": "sha512-sstDo2s8gQR/Qh2Bd6yNQ5xJv+D4ttyB9ZVjB3mBm3VkGl2RoqjV7fiw9mIHLbshHSRm2m8uf0XrIRQNWB/z6A==",
"dev": true
},
"@types/qs": { "@types/qs": {
"version": "6.9.7", "version": "6.9.7",
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",

View File

@ -4,13 +4,9 @@
"description": "", "description": "",
"main": "src/start.js", "main": "src/start.js",
"scripts": { "scripts": {
"build": "npm run build:api && npm run build:cdn && npm run build:gateway && npm run build:bundle", "postinstall": "cd ../util && npm i && cd ../api && npm i && cd ../cdn && npm i && cd ../gateway && npm i",
"build:bundle": "npx tsc -b .", "build": "npx tsc -b .",
"build:api": "cd ../api/ && npm run build",
"build:cdn": "cd ../cdn/ && npm run build",
"build:gateway": "cd ../gateway/ && npm run build",
"start": "npm run build && node dist/start.js", "start": "npm run build && node dist/start.js",
"bundle": "npm run build && node dist/startBundle.js",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"repository": { "repository": {
@ -26,17 +22,18 @@
"homepage": "https://fosscord.com", "homepage": "https://fosscord.com",
"devDependencies": { "devDependencies": {
"@types/amqplib": "^0.8.1", "@types/amqplib": "^0.8.1",
"@types/async-exit-hook": "^2.0.0",
"@types/bcrypt": "^5.0.0", "@types/bcrypt": "^5.0.0",
"@types/express": "^4.17.9", "@types/express": "^4.17.9",
"@types/i18next-node-fs-backend": "^2.1.0", "@types/i18next-node-fs-backend": "^2.1.0",
"@types/jsonwebtoken": "^8.5.0", "@types/jsonwebtoken": "^8.5.0",
"@types/mongodb": "^3.6.9", "@types/mongodb": "^3.6.9",
"@types/mongoose": "^5.10.5",
"@types/mongoose-autopopulate": "^0.10.1", "@types/mongoose-autopopulate": "^0.10.1",
"@types/mongoose-lean-virtuals": "^0.5.1", "@types/mongoose-lean-virtuals": "^0.5.1",
"@types/multer": "^1.4.5", "@types/multer": "^1.4.5",
"@types/node": "^14.17.9", "@types/node": "^14.17.9",
"@types/node-fetch": "^2.5.7", "@types/node-fetch": "^2.5.7",
"@types/node-os-utils": "^1.2.0",
"@types/uuid": "^8.3.0", "@types/uuid": "^8.3.0",
"@types/ws": "^7.4.0", "@types/ws": "^7.4.0",
"@zerollup/ts-transform-paths": "^1.7.18", "@zerollup/ts-transform-paths": "^1.7.18",

View File

@ -5,6 +5,7 @@
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"scripts": { "scripts": {
"postinstall": "npm run build",
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"build": "npx tsc -b .", "build": "npx tsc -b .",
"start": "npm run build && node dist/start.js" "start": "npm run build && node dist/start.js"
@ -29,7 +30,6 @@
"@types/fs-extra": "^9.0.12", "@types/fs-extra": "^9.0.12",
"@types/jsonwebtoken": "^8.5.0", "@types/jsonwebtoken": "^8.5.0",
"@types/mongodb": "^3.6.9", "@types/mongodb": "^3.6.9",
"@types/mongoose": "^5.10.5",
"@types/mongoose-autopopulate": "^0.10.1", "@types/mongoose-autopopulate": "^0.10.1",
"@types/mongoose-lean-virtuals": "^0.5.1", "@types/mongoose-lean-virtuals": "^0.5.1",
"@types/multer": "^1.4.7", "@types/multer": "^1.4.7",

View File

@ -4,6 +4,7 @@
"description": "", "description": "",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
"postinstall": "npm run build",
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"start": "npm run build && node dist/start.js", "start": "npm run build && node dist/start.js",
"build": "npx tsc -b .", "build": "npx tsc -b .",
@ -16,7 +17,6 @@
"@types/amqplib": "^0.8.1", "@types/amqplib": "^0.8.1",
"@types/jsonwebtoken": "^8.5.0", "@types/jsonwebtoken": "^8.5.0",
"@types/mongodb": "^3.6.9", "@types/mongodb": "^3.6.9",
"@types/mongoose": "^5.10.5",
"@types/mongoose-autopopulate": "^0.10.1", "@types/mongoose-autopopulate": "^0.10.1",
"@types/mongoose-lean-virtuals": "^0.5.1", "@types/mongoose-lean-virtuals": "^0.5.1",
"@types/node": "^14.17.9", "@types/node": "^14.17.9",

View File

@ -29,7 +29,6 @@
"@types/amqplib": "^0.8.1", "@types/amqplib": "^0.8.1",
"@types/jsonwebtoken": "^8.5.0", "@types/jsonwebtoken": "^8.5.0",
"@types/mongodb": "^3.6.9", "@types/mongodb": "^3.6.9",
"@types/mongoose": "^5.10.5",
"@types/mongoose-autopopulate": "^0.10.1", "@types/mongoose-autopopulate": "^0.10.1",
"@types/mongoose-lean-virtuals": "^0.5.1", "@types/mongoose-lean-virtuals": "^0.5.1",
"@types/node": "^14.17.9", "@types/node": "^14.17.9",

View File

@ -1,3 +1,4 @@
// @ts-nocheck
import "./MongoBigInt"; import "./MongoBigInt";
import mongoose, { Collection, Connection, LeanDocument } from "mongoose"; import mongoose, { Collection, Connection, LeanDocument } from "mongoose";
import { ChangeStream, ChangeEvent, Long } from "mongodb"; import { ChangeStream, ChangeEvent, Long } from "mongodb";

View File

@ -1,3 +1,4 @@
// @ts-nocheck
import mongoose from "mongoose"; import mongoose from "mongoose";
class LongSchema extends mongoose.SchemaType { class LongSchema extends mongoose.SchemaType {