0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 18:26:15 +01:00
posthog/package.json
Marius Andra e3bdf30084
Multithreaded server (#36)
* silence some test logs

* admit defeat in the battle with `esModuleInterop`

* add basic typescript piscina workers

* es module fix

* remove rollup and compile directly with typescript

* fix fetch import error

* make piscina work in jest, dist and dev... run plugins through it

* simplify tests

* store plugin status on the `server`

* config types

* not all keys needed

* add worker concurrency setting

* clean up code

* fix test worker code

* add a basic benchmark test

* refactor test

* refactor test utils

* support more serialized binary formats

* mock jest behind enemy lines

* less verbose logs in tests

* add test to make sure adding more CPU cores makes plugins faster!

* clone objects

* add 12

* fix linter's worries

* remove extra word

* improve display

* remove the exact cpu count from the list

* add postgres and redis services to github to make tests pass

* add ENV to config

* add ENV to config

* add db:init script

* add db:init script to CI

* No prepublish on yarn install

* return queue worker directly

* SCREAM! (just a bit more)

* remove buffer deprecation warning

* run tests serially (so that only one piscina performance test runs at a time)

* queue stop

* sigterm on piscina error

* shut down only once

* fix env override

* do not always override ENV

* do not always override ENV

* create team in db-init

* test parallelism on github actions (2 cpu cores)
2020-12-07 10:24:35 +01:00

92 lines
3.0 KiB
JSON

{
"name": "posthog-plugin-server",
"version": "0.2.0",
"description": "PostHog Plugin Server",
"types": "dist/src/index.d.ts",
"main": "dist/src/index.js",
"scripts": {
"test": "jest --runInBand",
"start": "yarn start:dev",
"start:dist": "node dist/src/index.js --config \"{\\\"BASE_DIR\\\": \\\"../posthog\\\"}\"",
"start:dev": "ts-node-dev --exit-child src/index.ts --config \"{\\\"BASE_DIR\\\": \\\"../posthog\\\"}\"",
"build": "yarn clean && yarn compile",
"clean": "rimraf dist/*",
"compile": "tsc -p .",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"prettier": "prettier --write .",
"prettier:check": "prettier --check .",
"prepublishOnly": "yarn test && yarn build",
"task:db-init": "ts-node ./tasks/db-init.ts"
},
"bin": {
"posthog-plugin-server": "./bin/posthog-plugin-server"
},
"author": "Marius Andra <marius.andra@gmail.com>",
"repository": "https://github.com/PostHog/posthog-plugin-server",
"license": "MIT",
"dependencies": {
"adm-zip": "^0.4.16",
"fastify": "^3.8.0",
"ioredis": "^4.19.2",
"node-fetch": "^2.6.1",
"node-schedule": "^1.3.2",
"pg": "^8.4.2",
"piscina": "^2.1.0",
"posthog-js-lite": "^0.0.5",
"posthog-plugins": "^0.2.3",
"tar-stream": "^2.1.4",
"uuid": "^8.3.1",
"vm2": "^3.9.2",
"yargs": "^16.1.0"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-typescript": "^7.8.3",
"@types/adm-zip": "^0.4.33",
"@types/ioredis": "^4.17.7",
"@types/jest": "^26.0.15",
"@types/node": "^14.14.6",
"@types/node-fetch": "^2.5.7",
"@types/node-schedule": "^1.3.1",
"@types/pg": "^7.14.6",
"@types/supertest": "^2.0.10",
"@types/tar-stream": "^2.1.0",
"@types/uuid": "^8.3.0",
"@types/yargs": "^15.0.9",
"@typescript-eslint/eslint-plugin": "^4.6.1",
"@typescript-eslint/parser": "^4.6.1",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.0.0",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-promise": "^4.1.1",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-standard": "^4.0.0",
"husky": ">=4",
"ioredis-mock": "^5.2.0",
"jest": "^26.6.3",
"lint-staged": ">=10.5.1",
"prettier": "^2.1.2",
"rimraf": "^3.0.0",
"supertest": "^6.0.1",
"ts-jest": "^26.4.4",
"ts-node": "^9.0.0",
"ts-node-dev": "^1.0.0",
"typescript": "^4.0.5"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,css,scss}": "prettier --write"
}
}