wretch
Version:
A tiny wrapper built around fetch with an intuitive syntax.
163 lines (162 loc) • 4.89 kB
JSON
{
"name": "wretch",
"version": "2.2.1",
"type": "module",
"description": "A tiny wrapper built around fetch with an intuitive syntax.",
"keywords": [
"wretch",
"fetch",
"ajax",
"request"
],
"engines": {
"node": ">=14"
},
"homepage": "https://elbywan.github.io/wretch",
"repository": {
"type": "git",
"url": "https://github.com/elbywan/wretch"
},
"bugs": {
"url": "https://github.com/elbywan/wretch/issues"
},
"main": "./dist/bundle/wretch.min.cjs",
"unpkg": "./dist/bundle/wretch.min.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"typesVersions": {
"*": {
"*": [
"dist/*",
"dist/*/index.d.ts",
"dist/index.d.ts"
]
}
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/bundle/wretch.min.cjs",
"import": "./dist/index.js"
},
"./all": {
"types": "./dist/index.all.d.ts",
"require": "./dist/bundle/wretch.all.min.cjs",
"import": "./dist/index.all.js"
},
"./addons/*": {
"types": "./dist/addons/*.d.ts",
"require": "./dist/bundle/addons/*.min.cjs",
"import": "./dist/addons/*.js"
},
"./middlewares/*": {
"types": "./dist/middlewares/*.d.ts",
"require": "./dist/bundle/middlewares/*.min.cjs",
"import": "./dist/middlewares/*.js"
},
"./package.json": "./package.json",
"./*.mjs": {
"default": "./dist/*.mjs"
},
"./*.cjs": {
"default": "./dist/*.cjs"
},
"./*": {
"default": "./dist/*.js"
}
},
"files": [
"dist"
],
"sideEffects": false,
"scripts": {
"start": "npm run build && npm run test",
"lint": "tslint -p tsconfig.json -t codeFrame",
"lint:fix": "tslint --fix -p tsconfig.json -t codeFrame",
"prebuild": "rimraf dist && rimraf coverage && npm run lint",
"build": "tsc -p . && rollup -c",
"mock": "node scripts/mockServer.js",
"mock:wait": "wait-on -t 10000 http://localhost:9876/ping",
"test": "concurrently --success first -k 'npm run mock:wait && jest' 'npm run mock'",
"test:karma": "concurrently --success first -k 'npm run mock:wait && karma start --single-run --browsers ChromeHeadless,FirefoxHeadless,SafariNative karma.conf.cjs' 'npm run mock'",
"test:karma:watch": "concurrently --success first -k 'npm run mock:wait && karma start --auto-watch --browsers ChromeHeadless karma.conf.cjs' 'npm run mock'",
"test:deno": "concurrently --success first -k 'npm run mock:wait && deno test --allow-net ./test/deno/wretch_test.ts' 'npm run mock'",
"changelog": "conventional-changelog -p wretch -i CHANGELOG.md -s -r 0",
"doc": "typedoc --out docs/api --readme none --excludeInternal src/index.ts 'src/addons/*.ts' 'src/middlewares/*.ts'",
"prepare": "npm run build",
"prepare:release": "npm run start && npm run doc && npm run changelog"
},
"author": "Julien Elbaz",
"license": "MIT",
"devDependencies": {
"@fastify/basic-auth": "^4.0.0",
"@fastify/cors": "^8.1.1",
"@fastify/formbody": "^7.3.0",
"@fastify/multipart": "^7.3.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.1.0",
"@rollup/plugin-typescript": "^9.0.2",
"@types/form-data": "^2.5.0",
"@types/jest": "^29.2.0",
"@types/lodash-es": "^4.17.6",
"@types/node": "^18.11.7",
"abortcontroller-polyfill": "^1.7.5",
"concurrently": "^7.5.0",
"conventional-changelog-cli": "^2.2.2",
"conventional-changelog-wretch": "file:scripts/conventional-changelog-wretch",
"dtrace-provider": "^0.8.8",
"fastify": "^4.9.2",
"form-data": "^4.0.0",
"jasmine-core": "^4.5.0",
"jest": "^29.2.2",
"karma": "^6.4.1",
"karma-chrome-launcher": "^3.1.1",
"karma-firefox-launcher": "^2.1.2",
"karma-jasmine": "^5.1.0",
"karma-safari-launcher": "^1.0.0",
"karma-safarinative-launcher": "^1.1.0",
"lodash-es": "^4.17.21",
"node-fetch": "^2",
"querystring": "^0.2.1",
"rimraf": "^3.0.2",
"rollup": "^3.2.3",
"ts-jest": "^29.0.3",
"tslib": "^2.3.1",
"tslint": "^6.1.2",
"typedoc": "^0.23.19",
"typescript": "^4.8.4",
"wait-on": "^6.0.1"
},
"jest": {
"testPathIgnorePatterns": [
"/node_modules/",
"/test/browser/",
"/test/deno"
],
"transform": {
"^.+\\.tsx?$": [
"ts-jest",
{
"tsconfig": "test/tsconfig.json"
}
]
},
"resolver": "<rootDir>/test/resolver.cjs",
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json"
],
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*.{js,ts}"
],
"coveragePathIgnorePatterns": [
"src/index.all.ts",
"src/addons/index.ts"
]
}
}