{
    "name": "@open-cluster-management/console-backend",
    "version": "0.0.1",
    "private": true,
    "scripts": {
        "postinstall": "[ ! -d ./certs ] && npm run generate-certs || true",
        "build": "npm run clean && tsc --sourceMap false --declaration false",
        "clean": "rm -rf coverage build",
        "test": "jest --verbose",
        "test:update": "LOG_LEVEL=NONE npm test -- -u",
        "lint": "eslint src test --ext .ts --max-warnings=0",
        "lint:fix": "eslint src test --ext .ts --fix",
        "check": "prettier --check **/*.ts **/*.json !coverage/** !build/** !**/package-lock.json",
        "check:fix": "prettier --write **/*.ts **/*.json !coverage/** !build/** !**/package-lock.json",
        "start": "source .env && PORT=4000 NODE_ENV=development ts-node-dev --no-notify --no-deps --respawn --transpile-only src/lib/main.ts | pino-zen -i time",
        "update": "rm -rf package-lock.json node_modules && npx npm-check-updates --doctor -u && npm install && npm audit fix && npm dedup && npm test && npm run lint:fix && npm run lint && npm run check:fix",
        "generate-certs": "mkdir -p certs && openssl req -subj '/C=US' -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -keyout certs/tls.key -out certs/tls.crt"
    },
    "dependencies": {
        "abort-controller": "^3.0.0",
        "dotenv": "^10.0.0",
        "find-my-way": "^4.3.0",
        "node-fetch": "^2.6.1",
        "pino": "^6.11.3",
        "raw-body": "^2.4.1"
    },
    "devDependencies": {
        "@types/dotenv": "^8.2.0",
        "@types/eslint": "^7.2.13",
        "@types/jest": "^26.0.23",
        "@types/node": "^14.17.4",
        "@types/node-fetch": "^2.5.10",
        "@types/pino": "^6.3.8",
        "@types/prettier": "^2.3.1",
        "@types/raw-body": "^2.3.0",
        "@typescript-eslint/eslint-plugin": "^4.28.2",
        "@typescript-eslint/parser": "^4.28.2",
        "eslint": "^7.30.0",
        "jest": "^26.x.x",
        "nock": "^13.1.1",
        "pino-zen": "^1.0.20",
        "prettier": "^2.3.2",
        "ts-jest": "^26.x.x",
        "ts-node": "^9.1.1",
        "ts-node-dev": "^1.1.8",
        "typescript": "^4.3.5"
    },
    "prettier": {
        "printWidth": 120,
        "tabWidth": 4,
        "semi": false,
        "singleQuote": true
    },
    "jest": {
        "preset": "ts-jest",
        "testEnvironment": "node",
        "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
        "collectCoverage": true,
        "coverageThreshold": {
            "global": {
                "branches": 0,
                "functions": 0,
                "lines": 0,
                "statements": 0
            }
        },
        "coverageReporters": [
            "text",
            "text-summary",
            "html"
        ],
        "collectCoverageFrom": [
            "src/**/*.ts",
            "!**/node_modules/**"
        ],
        "moduleFileExtensions": [
            "ts",
            "tsx",
            "js",
            "jsx",
            "json",
            "node"
        ],
        "setupFiles": [
            "<rootDir>/test/jest-setup.ts"
        ],
        "watchPathIgnorePatterns": [
            "coverage"
        ]
    },
    "eslintConfig": {
        "parser": "@typescript-eslint/parser",
        "parserOptions": {
            "ecmaVersion": 2018,
            "sourceType": "module",
            "project": [
                "./tsconfig.json",
                "./test/tsconfig.json"
            ]
        },
        "extends": [
            "eslint:recommended",
            "plugin:@typescript-eslint/eslint-recommended",
            "plugin:@typescript-eslint/recommended",
            "plugin:@typescript-eslint/recommended-requiring-type-checking"
        ],
        "rules": {
            "@typescript-eslint/no-non-null-assertion": "off",
            "@typescript-eslint/no-use-before-define": "off",
            "@typescript-eslint/no-unused-vars": "off",
            "@typescript-eslint/no-floating-promises": [
                "error",
                {
                    "ignoreVoid": true
                }
            ],
            "@typescript-eslint/no-misused-promises": [
                "error",
                {
                    "checksVoidReturn": false
                }
            ]
        }
    }
}
