package.json 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {
  2. "name": "query-node",
  3. "version": "0.1.0",
  4. "description": "Generated Warthog Project",
  5. "license": "MIT",
  6. "main": "dist/model/index.js",
  7. "types": "dist/model/index.d.ts",
  8. "scripts": {
  9. "bootstrap": "yarn bootstrap:dev",
  10. "bootstrap:dev": "yarn && yarn build:dev && yarn db:drop && yarn db:create && yarn db:migrate && yarn db:seed",
  11. "bootstrap:prod": "yarn && yarn build:prod && yarn start:prod",
  12. "//": "This is the default command run in CI, so it should point to Prod and also create Prod config",
  13. "build": "yarn build:prod",
  14. "build:prod": "WARTHOG_ENV=production yarn run config && yarn compile",
  15. "build:dev": "yarn run config:dev && yarn codegen && yarn compile",
  16. "check:code": "tsc --noEmit && yarn lint && prettier ./{src,test,tools}/**/*.ts --write",
  17. "clean": "yarn db:drop && rm -rf ./node_modules ./generated ./dist",
  18. "codegen": "warthog codegen",
  19. "config": "WARTHOG_ENV=$NODE_ENV yarn dotenv:generate",
  20. "config:dev": "WARTHOG_ENV=development yarn dotenv:generate",
  21. "compile": "rm -rf ./dist && yarn tsc",
  22. "deploy": "heroku git:remote -a warthog-starter && git push heroku main && WARTHOG_ENV=production yarn dotenv:generate && warthog db:migrate",
  23. "dotenv:generate": "dotenvi -s ${WARTHOG_ENV:-development}",
  24. "db:create": "warthog db:create",
  25. "db:drop": "warthog db:drop",
  26. "db:migrate:generate": "warthog db:migrate:generate --name",
  27. "db:migrate": "warthog db:migrate",
  28. "db:seed": "ts-node tools/seed.ts",
  29. "lint": "eslint './+(src|test|tools)/**/*.{js,ts}' --fix",
  30. "list:users": "ts-node ./tools/list-users.ts",
  31. "playground": "warthog playground",
  32. "prettier": "prettier ./{src,test,tools}/**/*.ts --write",
  33. "start": "yarn start:prod",
  34. "start:dev": "ts-node --type-check src/index.ts",
  35. "start:dev:watch": "nodemon -e ts,graphql -x ts-node --type-check src/index.ts",
  36. "start:prod": "WARTHOG_ENV=production yarn dotenv:generate && node dist/src/index.js",
  37. "test": "DEBUG= jest --verbose --coverage",
  38. "test:watch": "DEBUG= jest --watch",
  39. "db:sync": "SYNC=true WARTHOG_DB_SYNCHRONIZE=true ts-node --type-check src/index.ts"
  40. },
  41. "husky": {
  42. "hooks": {
  43. "pre-commit": "yarn run config:dev && lint-staged && tsc -p ./tsconfig.json && yarn test"
  44. }
  45. },
  46. "lint-staged": {
  47. "linters": {
  48. "*.ts": [
  49. "eslint --fix",
  50. "prettier --write",
  51. "git add"
  52. ],
  53. "*.{js,json}": [
  54. "prettier --write",
  55. "git add"
  56. ]
  57. },
  58. "ignore": [
  59. "**/generated/*"
  60. ]
  61. },
  62. "hydra": "https://github.com/Joystream/warthog/releases/download/v2.37.0/joystream-warthog-v2.37.0.tgz",
  63. "dependencies": {
  64. "dotenv": "^8.2.0",
  65. "reflect-metadata": "^0.1.13",
  66. "warthog": "https://github.com/Joystream/warthog/releases/download/v2.37.0/joystream-warthog-v2.37.0.tgz",
  67. "@types/bn.js": "^4.11.6",
  68. "bn.js": "^5.1.3",
  69. "lodash": "^4.17.15",
  70. "pg-listen": "^1.7.0",
  71. "typeorm": "^0.2.31"
  72. },
  73. "devDependencies": {
  74. "@types/jest": "^24.0.23",
  75. "dotenvi": "^0.9.0",
  76. "jest": "^24.9.0",
  77. "ts-jest": "^24.1.0",
  78. "ts-node": "^8.10",
  79. "ts-node-dev": "^1.0.0-pre.60",
  80. "typescript": "^3.9.7"
  81. },
  82. "jest": {
  83. "globals": {
  84. "ts-jest": {
  85. "tsConfig": "tsconfig.test.json"
  86. }
  87. },
  88. "transform": {
  89. ".ts": "ts-jest"
  90. },
  91. "testRegex": "\\.test\\.ts$",
  92. "moduleFileExtensions": [
  93. "js",
  94. "ts"
  95. ],
  96. "coveragePathIgnorePatterns": [
  97. "/node_modules/",
  98. "\\.test\\.ts$"
  99. ]
  100. },
  101. "prettier": {
  102. "printWidth": 100,
  103. "singleQuote": true
  104. }
  105. }