UNPKG

counterfact

Version:

a library for building a fake REST API for testing

115 lines (114 loc) 4.46 kB
{ "name": "counterfact", "version": "1.4.2", "description": "a library for building a fake REST API for testing", "type": "module", "main": "./dist/app.js", "exports": "./dist/app.js", "types": "./dist/server/types.d.ts", "author": "Patrick McElhaney <pmcelhaney@gmail.com> (https://patrickmcelhaney.com)", "license": "MIT", "repository": "github:pmcelhaney/counterfact", "bugs": "https://github.com/pmcelhaney/counterfact/issues", "keywords": [ "counterfact", "fake", "rest", "api", "testing" ], "engines": { "node": ">=17.0.0" }, "bin": { "counterfact": "./bin/counterfact.js" }, "files": [ "bin", "dist" ], "scripts": { "test": "yarn node --experimental-vm-modules ./node_modules/jest-cli/bin/jest --testPathIgnorePatterns=black-box", "test:black-box": "rimraf dist && rimraf out && yarn build && yarn node --experimental-vm-modules ./node_modules/jest-cli/bin/jest black-box --forceExit --coverage=false", "test:mutants": "stryker run stryker.config.json", "test:tsd": "tsd --typings ./dist/server/types.ts --files ./test/**/*.test-d.ts", "build": "tsc && copyfiles -f \"src/client/**\" dist/client && copyfiles -f \"src/server/types.ts\" dist/server && copyfiles -f \"src/server/*.cjs\" dist/server", "prepack": "yarn build", "release": "npx changeset publish", "prepare": "husky install", "lint": "eslint . --plugin file-progress --rule 'file-progress/activate: 1' --ignore-pattern dist --ignore-pattern out --ignore-pattern coverage", "lint:quickfix": "eslint --fix . eslint --fix demo-ts --rule=\"import/namespace: 0,etc/no-deprecated:0,import/no-cycle:0,no-explicit-type-exports/no-explicit-type-exports:0,import/no-deprecated:0,import/no-self-import:0,import/default:0,import/no-named-as-default:0\" --ignore-pattern dist --ignore-pattern out", "go:petstore": "yarn build && yarn counterfact https://petstore3.swagger.io/api/v3/openapi.json out", "go:petstore2": "yarn build && yarn counterfact https://petstore.swagger.io/v2/swagger.json out", "go:example": "yarn build && node ./bin/counterfact.js ./openapi-example.yaml out", "counterfact": "./bin/counterfact.js", "postinstall": "patch-package" }, "devDependencies": { "@changesets/cli": "2.29.6", "@stryker-mutator/core": "9.0.1", "@stryker-mutator/jest-runner": "9.0.1", "@stryker-mutator/typescript-checker": "9.0.1", "@swc/core": "1.13.3", "@swc/jest": "0.2.39", "@testing-library/dom": "10.4.1", "@types/jest": "30.0.0", "@types/js-yaml": "4.0.9", "@types/koa": "2.15.0", "@types/koa-bodyparser": "4.3.12", "@types/koa-proxy": "1.0.7", "@types/koa-static": "4.0.4", "@types/lodash": "4.17.20", "copyfiles": "2.4.1", "eslint": "9.28.0", "eslint-config-hardcore": "49.0.0", "eslint-formatter-github-annotations": "0.1.0", "eslint-import-resolver-typescript": "4.4.4", "eslint-plugin-etc": "2.0.3", "eslint-plugin-file-progress": "3.0.2", "eslint-plugin-import": "2.32.0", "eslint-plugin-jest": "29.0.1", "eslint-plugin-jest-dom": "5.5.0", "eslint-plugin-no-explicit-type-exports": "0.12.1", "eslint-plugin-prettier": "5.5.4", "eslint-plugin-unused-imports": "4.1.4", "husky": "9.1.7", "jest": "30.0.5", "jest-retries": "1.0.1", "node-mocks-http": "1.17.2", "rimraf": "6.0.1", "stryker-cli": "1.0.2", "supertest": "7.1.4", "tsd": "^0.33.0", "using-temporary-files": "2.2.1" }, "dependencies": { "@apidevtools/json-schema-ref-parser": "13.0.5", "@hapi/accept": "6.0.3", "@types/json-schema": "7.0.15", "ast-types": "0.14.2", "chokidar": "4.0.3", "commander": "14.0.0", "debug": "4.4.1", "fetch": "1.1.0", "fs-extra": "11.3.1", "handlebars": "4.7.8", "http-terminator": "3.2.0", "js-yaml": "4.1.0", "json-schema-faker": "0.5.9", "jsonwebtoken": "9.0.2", "koa": "3.0.1", "koa-bodyparser": "4.4.1", "koa-proxies": "0.12.4", "koa2-swagger-ui": "5.11.0", "lodash": "4.17.21", "node-fetch": "3.3.2", "open": "10.2.0", "patch-package": "8.0.0", "precinct": "12.2.0", "prettier": "3.6.2", "recast": "0.23.11", "typescript": "5.9.2" }, "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" }