{"_id":"@kentico/kontent-test-http-service-js","_rev":"37-71333c604ad0fbb5b6d75282d3276fc4","name":"@kentico/kontent-test-http-service-js","dist-tags":{"beta":"2.1.0-beta2","latest":"2.1.0"},"versions":{"2.0.0-beta1":{"name":"@kentico/kontent-test-http-service-js","version":"2.0.0-beta1","keywords":[],"author":{"url":"https://github.com/Simply007","name":"Ondřej Chrastina","email":"chrastina.ondra@gmail.com"},"license":"MIT","_id":"@kentico/kontent-test-http-service-js@2.0.0-beta1","maintainers":[{"name":"makma","email":"martinm@kentico.com"},{"name":"enngage","email":"ennspassion@gmail.com"},{"name":"rocky.intel","email":"rocky.intel@gmail.com"},{"name":"simply007","email":"ondrej.chrastina@kentico.com"}],"homepage":"https://github.com/Kentico/kontent-test-http-service-js#readme","bugs":{"url":"https://github.com/Kentico/kontent-test-http-service-js/issues"},"dist":{"shasum":"74bc1272fcea4c163b726321202dc99c2f2f7590","tarball":"https://registry.npmjs.org/@kentico/kontent-test-http-service-js/-/kontent-test-http-service-js-2.0.0-beta1.tgz","fileCount":3,"integrity":"sha512-NgfPWvyt/hmpsQrNUFoBjxD171RW/epBcPMdIkeIkYv99k1zdFrr9wdE35ec415opvb714s4Q/9QtRh3jP8wVA==","signatures":[{"sig":"MEYCIQDYNFfStr/fRhBq9Iu6HxqPJghlAnf2IYQDTNn9UrSQTQIhAIEnpKopM8Vmq2q9Sm+BqqyJYnV5Wxnj7LJvPFaX1dee","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7250,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdn1ZyCRA9TVsSAnZWagAA970QAIfiUu0Y50/zh2tt9xo8\nkzW6ID4gwEhzJFvo6UzYJlZWXlADB4VmZVigpC8h/ImyODtnkt49NXhEs1U3\nQ76CHgfcd/Kw7GY2TriYJWOCV8iE72TQoCR+Ls3cn5p7ngUfST/yqF2By4Bw\nJGzDrVaKmzlXUfkrHN6ITQK6r27Z+ivAlajUD0FnoI0eeOxo5T1ufAW+TrXZ\nUxOmy8JKj/wPZvyjGntNJIPiAYsfHRN3KYO4WXjqgl+37gGfCKOfmx63o+kB\nP1FY/hxRCL6dpFYjSQV+cnb4wFEJIcFG07HvNXMNqpJMIn4ea30NlM8bHANW\nX6bLb9cREbhVS7Mp16Wokh1xDx2B0IYtWKZ1mqQI6vYD3DWsYK/svWJ5JuRh\nEyMyC5ji77y92gm748kYvJBV3fDdHdL67gyN8h8FRlUBOUHQfozX1Vt6WU7d\naR+F/9P/ja5RTj5jqNa8n2J3hDSDgvBjXy3XLBZnEScLFqDQm8Bqv0trN2HN\n3Z1Mh87CPbG7q+NOLFvG9d0XQzUiPy+PljyLWv2M3QO+VWjCnTIfvb4bz4Bc\nGgckfgEV0n+gY5Dktj6v5YJmUvEzgI6xvqQCB5gnRBUA0y7xTGW+JAggA/iY\nzV2XIC8VL+NvrfNGx68BqqvaEVtEv0oqrt34hyuOHGnzuCtSezGLyTgrOtId\ni25s\r\n=lZ/N\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"globals":{},"testRegex":"(/__tests__/.*\\.(test|spec))\\.(ts|tsx|js)$","transform":{"\\.(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"modulePaths":["src"],"testEnvironment":"node","coverageDirectory":"<rootDir>/coverage","collectCoverageFrom":["src/**/*.ts"],"moduleFileExtensions":["ts","tsx","js"],"coveragePathIgnorePatterns":["/node_modules/"]},"main":"lib/index.js","engines":{"node":">=6.0.0"},"gitHead":"d112a1239f94c18f601531171968a7eabb678468","scripts":{"lint":"tslint --project tsconfig.json --fix \"src/**/*.ts\" && prettier --write \"src/**/*.ts\"","test":"jest","build":"rimraf lib && tsc -p tsconfig.build.json","cover":"jest --coverage --collectCoverageFrom=src/**/*.{ts,tsx} --collectCoverageFrom=!src/__tests__/**","precommit":"lint-staged","test:watch":"jest --watchAll"},"typings":"lib/index.d.ts","_npmUser":{"name":"simply007","email":"ondrej.chrastina@kentico.com"},"prettier":{"semi":false,"singleQuote":true},"repository":{"url":"git+https://github.com/Kentico/kontent-test-http-service-js.git","type":"git"},"_npmVersion":"6.4.1","description":"[![npm](https://img.shields.io/npm/v/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](https://www.npmjs.com/package/%40kentico%2Fkontent-test-http-service-js)\r [![npm](https://img.shields.io/npm/dt/%40kentico%2Fkontent-test-http-service-js.svg?","directories":{"lib":"lib"},"lint-staged":{"*.ts":["tslint --fix --project tsconfig.json","prettier --write","git add"]},"_nodeVersion":"10.15.3","dependencies":{"tslib":"^1.9.3","@kentico/kontent-core":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","rxjs":"^6.4.0","husky":"^1.3.1","rimraf":"^2.6.3","tslint":"^5.12.1","ts-jest":"^23.10.5","prettier":"^1.16.4","coveralls":"^3.0.2","typescript":"^3.3.3","@types/jest":"^23.3.14","@types/node":"^10.12.23","lint-staged":"^8.1.3","tslint-config-prettier":"^1.18.0","tslint-config-standard":"^8.0.1","@kentico/kontent-delivery":"^7.0.1"},"peerDependencies":{"rxjs":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/kontent-test-http-service-js_2.0.0-beta1_1570723442004_0.4700394759225859","host":"s3://npm-registry-packages"}},"2.0.0-beta2":{"name":"@kentico/kontent-test-http-service-js","version":"2.0.0-beta2","keywords":[],"author":{"url":"https://github.com/Simply007","name":"Ondřej Chrastina","email":"chrastina.ondra@gmail.com"},"license":"MIT","_id":"@kentico/kontent-test-http-service-js@2.0.0-beta2","maintainers":[{"name":"enngage","email":"ennspassion@gmail.com"},{"name":"makma","email":"martinm@kentico.com"},{"name":"rocky.intel","email":"rocky.intel@gmail.com"},{"name":"simply007","email":"ondrej.chrastina@kentico.com"}],"homepage":"https://github.com/Kentico/kontent-test-http-service-js#readme","bugs":{"url":"https://github.com/Kentico/kontent-test-http-service-js/issues"},"dist":{"shasum":"cb220a83c46f0565c73db81e894ab39a4dc183c6","tarball":"https://registry.npmjs.org/@kentico/kontent-test-http-service-js/-/kontent-test-http-service-js-2.0.0-beta2.tgz","fileCount":9,"integrity":"sha512-mRTv1QFJ6mbJ4GWici/7iCrZkJyTV2nJidwm2fNbpbZZyYYILHCskGGUB1XZQLd5SzQ0GujZKA9u4RMRsbjCKA==","signatures":[{"sig":"MEUCIFh/zhDB2+D1Qaj3h7z6NhGOjBVOH4zAPlNQqoA31NOSAiEA5u0r1uSLD5a/NJBuXKw8Dw3QL7Co70Np4Ej1nTjdwsQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdn1lWCRA9TVsSAnZWagAArb8QAI5/EP0Z1H9Z6Yf0pAB9\nLXORzk+Ss4I48lsJtjdAIylbcDT8PKOjDmlRj2oaoFBQZl7sr7DwuTrw1Fg6\n8bDm+Ach36J/DYPOmbWY/FlGxZEmxDaWnGNaKhDXFtpV0AL4lagKqNs3Pg45\noZ8tUcYJO1fLX1nkfY4YYfdeM7RZHCWIE1F4daPurhj3Hj2HISE32AM8J8+d\nGY1dAOBaEgL7DrUdVY5jYxNLApx2lPYmEtG/Pj6f3GRoR/5FgaS25Od+hu4U\n2yU/9713e+AGhbkbgm3X2beEAFVfn7yysAnzJ5D3jtuU/yjmcvOMQBPRpzwB\ntBt6MOwOFaURXneiLM9rFX4BldR5IJangvOrjTDcBT6GprjoAPE7qLOJViKs\nDyZbahNSW8sG9abXQ8nXkaZPEx1xtc27r3TgNRROoEpoQmW7ePZDUgn0uai7\n0zaY1IUh9A/NSiOng3TuAy5pOyEm2BMSBbXVxG5h6SBiHT0PZU9h86blAyDx\ny5KZe6gK3nglK18LXi/+o6dzyu6kOOAlfnFH5pEG64SJ537tYlDTLMz9na72\nXdgTb+89060NW/KGmLRksoIXWuW/HoxydUHSIFEyMjxvdt184i/Niur8ztqZ\nv12q/MXKNuK1NOv2f2V4o3+IdFNG4q871IldbWOhPjckjaRe520eAtd4LJZa\ngJ8S\r\n=vsMH\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"globals":{},"testRegex":"(/__tests__/.*\\.(test|spec))\\.(ts|tsx|js)$","transform":{"\\.(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"modulePaths":["src"],"testEnvironment":"node","coverageDirectory":"<rootDir>/coverage","collectCoverageFrom":["src/**/*.ts"],"moduleFileExtensions":["ts","tsx","js"],"coveragePathIgnorePatterns":["/node_modules/"]},"main":"lib/index.js","readme":"# Kentico Kontent Test HTTP Service for Kontent JavaScript SDKs\r\n\r\n[![npm](https://img.shields.io/npm/v/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](https://www.npmjs.com/package/%40kentico%2Fkontent-test-http-service-js)\r\n[![npm](https://img.shields.io/npm/dt/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](https://www.npmjs.com/package/%40kentico%2Fkontent-test-http-service-js)\r\n[![npm](https://img.shields.io/npm/l/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](%40kentico%2Fkontent-test-http-service-js)\r\n[![Stack Overflow](https://img.shields.io/badge/Stack%20Overflow-ASK%20NOW-FE7A16.svg?logo=stackoverflow&logoColor=white)](https://stackoverflow.com/tags/kentico-kontent)\r\n\r\n[![Build Status](https://img.shields.io/travis/Kentico/kontent-test-http-service-js.svg?maxAge=1000)](https://travis-ci.com/Kentico/kontent-test-http-service-js)\r\n[![dependency Status](https://img.shields.io/david/Kentico/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](https://david-dm.org/Kentico/kontent-test-http-service-js)\r\n\r\n[![Maintainability](https://api.codeclimate.com/v1/badges/f22cad469cc8779c2583/maintainability)](https://codeclimate.com/github/Kentico/kontent-test-http-service-js/maintainability)\r\n\r\nThis is the source for the npm package called `@kentico/kontent-test-http-service-js`.\r\n\r\nThis package is meant to be used as a fake HTTP Service when testing the [Kentico Kontent Delivery SDK](https://github.com/Kentico/kontent-delivery-sdk-js) and [Kentico Kontent Management SDK](https://github.com/Kentico/kontent-management-sdk-js). It is basically an implementation of [IHttpService](https://github.com/Kentico/kontent-core-js/blob/master/lib/http/ihttp.service.ts) that could be used when [configuring the Delivery client](https://github.com/Kentico/kontent-delivery-sdk-js/blob/master/DOCS.md#client-configuration) or [configuring Management client](https://github.com/Kentico/kontent-management-sdk-js#configuration).\r\n\r\n## Install\r\n\r\nWith `npm`:\r\n\r\n```sh\r\nnpm install @kentico/kontent-test-http-service-js\r\n```\r\n\r\n## Usage\r\n\r\nThis it the example of the usage. The object `fakeResponseConfig` could contain multiple entries. An entry is chosen by matching the request url against the regular expression pattern provided as a key.\r\n\r\n> The full example is in [delivery client tests](/src/__tests__/delivery-client.test.ts).\r\n\r\n```typescript\r\nconst fakeResponseConfig = new Map<RegExp, FakeResponseConfig>()\r\nfakeResponseConfig.set(\r\n  // THIS IS A PATTERN THAT WOULD BE USED FOR MATCHING WHEN\r\n  // QUERYING THE DATA AGAINST THE URL\r\n  /https:\\/\\/deliver.kontent.ai\\/.*\\/items/,  \r\n  {\r\n    // HERE YOU PROVIDE YOUR FAKE RESPONSE FOR THIS PATTERN\r\n    fakeResponseJson: {\r\n      items: [\r\n        {\r\n          system: {...},\r\n          elements: {...}\r\n        }\r\n      ],\r\n      pagination: {\r\n        continuation_token: null,\r\n        next_page: null\r\n      }\r\n    },\r\n    throwError: false\r\n  });\r\n\r\nconst fakeHttpService =\r\n new KontentTestHttpService(fakeResponseConfig);\r\n\r\nconst deliveryClientConfig = {\r\n      projectId: 'dummyProject',\r\n      typeResolvers: [],\r\n      httpService: fakeHttpService\r\n    };\r\n\r\nconst client = new DeliveryClient(deliveryClientConfig)\r\n```\r\n\r\n## Author\r\n\r\nOndřej Chrastina — [@Simply007](https://twitter.com/Simply007)\r\n\r\n### Thanks\r\n\r\n- Author of the [typescript module boilerplate](https://github.com/jeffijoe/ts-module-boilerplate) Jeff Hansen — [@Jeffijoe](https://twitter.com/Jeffijoe)\r\n\r\n![Analytics](https://kentico-ga-beacon.azurewebsites.net/api/UA-69014260-4/Kentico/kontent-test-http-service-js?pixel)\r\n","engines":{"node":">=6.0.0"},"gitHead":"d112a1239f94c18f601531171968a7eabb678468","scripts":{"lint":"tslint --project tsconfig.json --fix \"src/**/*.ts\" && prettier --write \"src/**/*.ts\"","test":"jest","build":"rimraf lib && tsc -p tsconfig.build.json","cover":"jest --coverage --collectCoverageFrom=src/**/*.{ts,tsx} --collectCoverageFrom=!src/__tests__/**","precommit":"lint-staged","test:watch":"jest --watchAll"},"typings":"lib/index.d.ts","_npmUser":{"name":"simply007","email":"ondrej.chrastina@kentico.com"},"prettier":{"semi":false,"singleQuote":true},"repository":{"url":"git+https://github.com/Kentico/kontent-test-http-service-js.git","type":"git"},"_npmVersion":"6.4.1","description":"[![npm](https://img.shields.io/npm/v/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](https://www.npmjs.com/package/%40kentico%2Fkontent-test-http-service-js)\r [![npm](https://img.shields.io/npm/dt/%40kentico%2Fkontent-test-http-service-js.svg?","directories":{"lib":"lib"},"lint-staged":{"*.ts":["tslint --fix --project tsconfig.json","prettier --write","git add"]},"_nodeVersion":"10.15.3","dependencies":{"tslib":"^1.9.3","@kentico/kontent-core":"^2.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","rxjs":"^6.4.0","husky":"^1.3.1","rimraf":"^2.6.3","tslint":"^5.12.1","ts-jest":"^23.10.5","prettier":"^1.16.4","coveralls":"^3.0.2","typescript":"^3.3.3","@types/jest":"^23.3.14","@types/node":"^10.12.23","lint-staged":"^8.1.3","tslint-config-prettier":"^1.18.0","tslint-config-standard":"^8.0.1","@kentico/kontent-delivery":"^7.0.1"},"peerDependencies":{"rxjs":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/kontent-test-http-service-js_2.0.0-beta2_1570724181755_0.039264330758031596","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@kentico/kontent-test-http-service-js","version":"2.0.0","keywords":[],"author":{"url":"https://github.com/Simply007","name":"Ondřej Chrastina","email":"chrastina.ondra@gmail.com"},"license":"MIT","_id":"@kentico/kontent-test-http-service-js@2.0.0","maintainers":[{"name":"enngage","email":"ennspassion@gmail.com"},{"name":"makma","email":"martinm@kentico.com"},{"name":"rocky.intel","email":"rocky.intel@gmail.com"},{"name":"simply007","email":"ondrej.chrastina@kentico.com"}],"homepage":"https://github.com/Kentico/kontent-test-http-service-js#readme","bugs":{"url":"https://github.com/Kentico/kontent-test-http-service-js/issues"},"dist":{"shasum":"930ba7201eeb61a8b56f96d5be916b2bb6d18753","tarball":"https://registry.npmjs.org/@kentico/kontent-test-http-service-js/-/kontent-test-http-service-js-2.0.0.tgz","fileCount":9,"integrity":"sha512-BqAqpAWlDeUQLkY0TubLbqVAVT3do7gkNOgXrJ4B1HZUSYFoCgNj8lv6TpfmMd8i6+kF0LAI7TX2ckVxRUFpCw==","signatures":[{"sig":"MEUCIEZ2grreSl7vedidxlVlJtOWJ1NisTcy2vplJ56sufkoAiEA6MInfGC/VeTkDBgOxKpWfUphUQrPiM4y80IwaKNpRhs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12130,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoC9sCRA9TVsSAnZWagAAA+sP/2f75hn90GX49dSeMoyB\nIODdshqExVIOoM4A09zsu1auf8ArMl0RyXai1o5L1I+hoE69YvTL8lU0/uDT\nTh5c8W8EKGBJmvjgoYTLM+LWYABcAS3ps0MnkRnCZJWda0F9pOZ9OuCBDHHm\nocomJ/uwFx68zBQKVf+B8jWxwDk2Kwcs1fdsYjvkgiLTGPSDDiLVhImWCbme\n0qEQDNinL4R0g2ZWG/ySno6Mxo9RCUFQE8YQ/KNu9SpOxxuY4cFi/Ek81qQJ\nTGSY4R9FjH9p6bs+wjzF7BtOREFWLrX5pGuelhUEboL94cVr4615JH/R2AJy\nBRe67MKnk3BnSbheNlrKnOX90BJ2LE+NMGYBzRTwVDclYkWEW+8TJMQGJeW0\nHp5sjQIJ6bPQ0vuW6JhSC5ezeZa4SDTs8UdZTAKQ2Id39036FjLzEFfnT7Ey\nuAOkGixTXgwKdowjpsJslLpih2y2VtfTQ5LedOq6TGWVbc7MZBEygpVjrhfB\ngrOiynHogX5XnpVUhY3RK0akO8auWSwLOfNbqJRh0LSyNHygcsy7wpG7zRDG\nN1oRGlc2ZGXsbZHnNkx6i0LNWnG8uQ8FNhqAOegJ9grgQ88ILM3iGYikifwg\nQ+D/jXozsbg3uNSH4f0ZTEnNVmnR34jTIwki/O9Fc/jMIiM536QubGjRXlvU\n8Kk6\r\n=ssoe\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"globals":{},"testRegex":"(/__tests__/.*\\.(test|spec))\\.(ts|tsx|js)$","transform":{"\\.(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"modulePaths":["src"],"testEnvironment":"node","coverageDirectory":"<rootDir>/coverage","collectCoverageFrom":["src/**/*.ts"],"moduleFileExtensions":["ts","tsx","js"],"coveragePathIgnorePatterns":["/node_modules/"]},"main":"lib/index.js","engines":{"node":">=6.0.0"},"gitHead":"1d7a73481328b71408cf67de3c79245cf82e3f98","scripts":{"lint":"tslint --project tsconfig.json --fix \"src/**/*.ts\" && prettier --write \"src/**/*.ts\"","test":"jest","build":"rimraf lib && tsc -p tsconfig.build.json","cover":"jest --coverage --collectCoverageFrom=src/**/*.{ts,tsx} --collectCoverageFrom=!src/__tests__/**","precommit":"lint-staged","test:watch":"jest --watchAll"},"typings":"lib/index.d.ts","_npmUser":{"name":"simply007","email":"ondrej.chrastina@kentico.com"},"prettier":{"semi":false,"singleQuote":true},"deprecated":"Functionality moved to @kentico/kontent-core","repository":{"url":"git+https://github.com/Kentico/kontent-test-http-service-js.git","type":"git"},"_npmVersion":"6.11.3","description":"[![npm](https://img.shields.io/npm/v/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](https://www.npmjs.com/package/%40kentico%2Fkontent-test-http-service-js) [![npm](https://img.shields.io/npm/dt/%40kentico%2Fkontent-test-http-service-js.svg?m","directories":{"lib":"lib"},"lint-staged":{"*.ts":["tslint --fix --project tsconfig.json","prettier --write","git add"]},"_nodeVersion":"12.11.1","dependencies":{"tslib":"^1.9.3","@kentico/kontent-core":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","rxjs":"^6.4.0","husky":"^1.3.1","rimraf":"^2.6.3","tslint":"^5.12.1","ts-jest":"^23.10.5","prettier":"^1.16.4","coveralls":"^3.0.2","typescript":"^3.3.3","@types/jest":"^23.3.14","@types/node":"^10.12.23","lint-staged":"^8.1.3","tslint-config-prettier":"^1.18.0","tslint-config-standard":"^8.0.1","@kentico/kontent-delivery":"^7.0.1"},"peerDependencies":{"rxjs":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/kontent-test-http-service-js_2.0.0_1570778988235_0.07685087920973133","host":"s3://npm-registry-packages"}},"2.1.0-beta":{"name":"@kentico/kontent-test-http-service-js","version":"2.1.0-beta","keywords":[],"author":{"url":"https://github.com/Simply007","name":"Ondřej Chrastina","email":"chrastina.ondra@gmail.com"},"license":"MIT","_id":"@kentico/kontent-test-http-service-js@2.1.0-beta","maintainers":[{"name":"enngage","email":"ennspassion@gmail.com"},{"name":"makma","email":"martinm@kentico.com"},{"name":"rocky.intel","email":"rocky.intel@gmail.com"},{"name":"simply007","email":"ondrej.chrastina@kentico.com"}],"homepage":"https://github.com/Kentico/kontent-test-http-service-js#readme","bugs":{"url":"https://github.com/Kentico/kontent-test-http-service-js/issues"},"dist":{"shasum":"ef2272b3fcff75edb4f7131ffb97b310950743ce","tarball":"https://registry.npmjs.org/@kentico/kontent-test-http-service-js/-/kontent-test-http-service-js-2.1.0-beta.tgz","fileCount":9,"integrity":"sha512-DIf7ZL9mKQSVz8ZU3Y5IK1Q/eQMLCoNTOZvXItbpNVUVDO7iviA722fgkGOSQS0K/y8Hw+tB4TzUdPrinKwGQw==","signatures":[{"sig":"MEUCIQDVpV7VsgN5hYJZYXSMiTwdIr+qvZuz2nb2wcfLNrKuDgIgJgWkmHBPe+8NpdiDVPmHU9tS2aOIUslkzQCvnNzXgYo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrsGdCRA9TVsSAnZWagAAJ44P/j9q6pvgVtupll/eSp61\nXg7ZeURkm/ALfq4xBm+sT4lL8j+AmD8oUIoL4Z1KoITW49Ugl+Th3fm+StNm\nYs9GZz3yM83WyHpUb6cYOat0lZP7z1ntE42jfK3AA+hJt336RIvkgmh11pd2\n4uzERyairZsaMfOfxygV01ejcnWk6tz1OuzFACTrwfaDZm80sK1FDSU7ohAE\n3TcduOhH21qDlcbh3eaqZIKbjjwy5/Zp33tjNV6uWPH5SJ1hhmBEYQVIXfLS\nGRUu4KwVLoV2fYkIWvxubWaNoVB3OOKTjvFosBBcOOlcT5l2OO7yurLETAMW\ndvMqIAnR/JHu5viK2d/D/S3RVvbLXEJGSJgMLUjrjgOM5A7Fbi9iyOJJh5ks\nJqrz02GO8hFa1kbNnMOaDobbQETz9PmlXt7qaO+3LCe/++gYW19tYdQtQ4wr\nxrcAp7xjQvLz+0C4wxmuHPSOsd6Sjs0YfksEauuwZGh2pTUSBEj8fPRANoeC\nEtCSS3aW85VtLSVvGFAZlalNlNBZqSQ3EeIEZRIWkss7Be9vwrTiZQkbb46X\nflYpbNxC3Jn/9PwRo9zDuYPZFqfyJPgIXZP4KMr3M0MvqyePCRBPBZCQyvYv\nk268G9Wy2t+a3dD89Fmdi4UU8YIBZRyIJFh3TQKVUDhx7MXCXRnmcYI/0g4Y\nVy1Q\r\n=mMLc\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"globals":{},"testRegex":"(/__tests__/.*\\.(test|spec))\\.(ts|tsx|js)$","transform":{"\\.(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"modulePaths":["src"],"testEnvironment":"node","coverageDirectory":"<rootDir>/coverage","collectCoverageFrom":["src/**/*.ts"],"moduleFileExtensions":["ts","tsx","js"],"coveragePathIgnorePatterns":["/node_modules/"]},"main":"lib/index.js","readme":"# Kentico Kontent Test HTTP Service for Kontent JavaScript SDKs\n\n[![npm](https://img.shields.io/npm/v/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](https://www.npmjs.com/package/%40kentico%2Fkontent-test-http-service-js)\n[![npm](https://img.shields.io/npm/dt/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](https://www.npmjs.com/package/%40kentico%2Fkontent-test-http-service-js)\n[![npm](https://img.shields.io/npm/l/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](%40kentico%2Fkontent-test-http-service-js)\n[![Stack Overflow](https://img.shields.io/badge/Stack%20Overflow-ASK%20NOW-FE7A16.svg?logo=stackoverflow&logoColor=white)](https://stackoverflow.com/tags/kentico-kontent)\n\n[![Build Status](https://img.shields.io/travis/Kentico/kontent-test-http-service-js.svg?maxAge=1000)](https://travis-ci.com/Kentico/kontent-test-http-service-js)\n[![dependency Status](https://img.shields.io/david/Kentico/kontent-test-http-service-js.svg?maxAge=1000)](https://david-dm.org/Kentico/kontent-test-http-service-js)\n\n[![Maintainability](https://api.codeclimate.com/v1/badges/2d82fb14b450918a1778/maintainability)](https://codeclimate.com/github/Kentico/kontent-test-http-service-js/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/2d82fb14b450918a1778/test_coverage)](https://codeclimate.com/github/Kentico/kontent-test-http-service-js/test_coverage)\n\nThis is the source for the npm package called `@kentico/kontent-test-http-service-js`.\n\nThis package is meant to be used as a fake HTTP Service when testing the [Kentico Kontent Delivery SDK](https://github.com/Kentico/kontent-delivery-sdk-js) and [Kentico Kontent Management SDK](https://github.com/Kentico/kontent-management-sdk-js). It is basically an implementation of [IHttpService](https://github.com/Kentico/kontent-core-js/blob/master/lib/http/ihttp.service.ts) that could be used when [configuring the Delivery client](https://github.com/Kentico/kontent-delivery-sdk-js/blob/master/DOCS.md#client-configuration) or [configuring Management client](https://github.com/Kentico/kontent-management-sdk-js#configuration).\n\n## Install\n\nWith `npm`:\n\n```sh\nnpm install @kentico/kontent-test-http-service-js\n```\n\n## Usage\n\nThis it the example of the usage. The object `fakeResponseConfig` could contain multiple entries. An entry is chosen by matching the request url against the regular expression pattern provided as a key.\n\n> The full example is in [delivery client tests](/src/__tests__/delivery-client.test.ts).\n\n```typescript\nconst fakeResponseConfig = new Map<RegExp, FakeResponseConfig>()\nfakeResponseConfig.set(\n  // THIS IS A PATTERN THAT WOULD BE USED FOR MATCHING WHEN\n  // QUERYING THE DATA AGAINST THE URL\n  /https:\\/\\/deliver.kontent.ai\\/.*\\/items/,  \n  {\n    // HERE YOU PROVIDE YOUR FAKE RESPONSE FOR THIS PATTERN\n    fakeResponseJson: {\n      items: [\n        {\n          system: {...},\n          elements: {...}\n        }\n      ],\n      pagination: {\n        continuation_token: null,\n        next_page: null\n      }\n    },\n    throwError: false,\n    fakeHeaders: [{\n       header: 'dummy-header-name',\n       value: 'dummy value'\n       }],\n    fakeStatus: 200\n  });\n\nconst fakeHttpService =\n new KontentTestHttpService(fakeResponseConfig);\n\nconst deliveryClientConfig = {\n      projectId: 'dummyProject',\n      typeResolvers: [],\n      httpService: fakeHttpService\n    };\n\nconst client = new DeliveryClient(deliveryClientConfig)\n```\n\n## Author\n\nOndřej Chrastina — [@Simply007](https://twitter.com/Simply007)\n\n### Thanks\n\n- Author of the [typescript module boilerplate](https://github.com/jeffijoe/ts-module-boilerplate) Jeff Hansen — [@Jeffijoe](https://twitter.com/Jeffijoe)\n\n![Analytics](https://kentico-ga-beacon.azurewebsites.net/api/UA-69014260-4/Kentico/kontent-test-http-service-js?pixel)\n","engines":{"node":">=6.0.0"},"gitHead":"5a71924139253eb559e9c2429d777f56a7b38d11","scripts":{"lint":"tslint --project tsconfig.json --fix \"src/**/*.ts\" && prettier --write \"src/**/*.ts\"","test":"jest","build":"rimraf lib && tsc -p tsconfig.build.json","cover":"jest --coverage --collectCoverageFrom=src/**/*.{ts,tsx} --collectCoverageFrom=!src/__tests__/**","precommit":"lint-staged","test:watch":"jest --watchAll"},"typings":"lib/index.d.ts","_npmUser":{"name":"simply007","email":"ondrej.chrastina@kentico.com"},"prettier":{"semi":false,"singleQuote":true},"repository":{"url":"git+https://github.com/Kentico/kontent-test-http-service-js.git","type":"git"},"_npmVersion":"6.12.0","description":"[![npm](https://img.shields.io/npm/v/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](https://www.npmjs.com/package/%40kentico%2Fkontent-test-http-service-js) [![npm](https://img.shields.io/npm/dt/%40kentico%2Fkontent-test-http-service-js.svg?m","directories":{"lib":"lib"},"lint-staged":{"*.ts":["tslint --fix --project tsconfig.json","prettier --write","git add"]},"_nodeVersion":"12.13.0","dependencies":{"tslib":"^1.9.3","@kentico/kontent-core":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","rxjs":"^6.4.0","husky":"^1.3.1","rimraf":"^2.6.3","tslint":"^5.12.1","ts-jest":"^23.10.5","prettier":"^1.16.4","coveralls":"^3.0.2","typescript":"^3.3.3","@types/jest":"^23.3.14","@types/node":"^10.12.23","lint-staged":"^8.1.3","tslint-config-prettier":"^1.18.0","tslint-config-standard":"^8.0.1","@kentico/kontent-delivery":"^7.2.0"},"peerDependencies":{"rxjs":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/kontent-test-http-service-js_2.1.0-beta_1571733917210_0.33919588580592785","host":"s3://npm-registry-packages"}},"2.1.0-beta2":{"name":"@kentico/kontent-test-http-service-js","version":"2.1.0-beta2","keywords":[],"author":{"url":"https://github.com/Simply007","name":"Ondřej Chrastina","email":"chrastina.ondra@gmail.com"},"license":"MIT","_id":"@kentico/kontent-test-http-service-js@2.1.0-beta2","maintainers":[{"name":"enngage","email":"ennspassion@gmail.com"},{"name":"makma","email":"martinm@kentico.com"},{"name":"rocky.intel","email":"rocky.intel@gmail.com"},{"name":"simply007","email":"ondrej.chrastina@kentico.com"}],"homepage":"https://github.com/Kentico/kontent-test-http-service-js#readme","bugs":{"url":"https://github.com/Kentico/kontent-test-http-service-js/issues"},"dist":{"shasum":"a3b45d4df18222e5b3f397d2d8e16813a143f648","tarball":"https://registry.npmjs.org/@kentico/kontent-test-http-service-js/-/kontent-test-http-service-js-2.1.0-beta2.tgz","fileCount":9,"integrity":"sha512-RuajvhcvhfZNJqaZFWpAjUoL0kQc7aJ5VH0v9EmFdxbT9z8i6mQjiAmztrl18R1wgbyL2uIIyv5jGwVz0RTnpQ==","signatures":[{"sig":"MEUCIQDAha7HBgunKDleLndBe7rM1DowTl9IHUOSLIYOiO3s7AIgOhd1M7d73PbwyLf6BoHvimt0m1y618zsUp3WNZpTTgU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt7/MCRA9TVsSAnZWagAA4zgP/ifE2z15kcdv8nqBZ99z\nn7VlTB8oqdAbyxI0BZdMHqXGQBiDtSVIMVqHdapR5DYFg6EIHOUjst9w94SG\n4GReW4XXIsMu296x87plEXcnKmKDAXwxXY4VwfOkRNI+92W3nl658PKo2UEe\nBDaA/CouXP033F6L8jcWPU76lJCz799s3my5eI1i25yx3u+HjPst4wXVvcXQ\nzbtIMAdqWzzqaHA6P9Q2Yby6D13n+/UzEycmbXP7ewzYiUMUTuXiLXmfeaFG\npq3M56szoVvpF1j2xyJLmLxwtrDMwisGOiDHEH6WgBaauPIc/GJhKDe/KOha\n9bjqaVxskrUr4RHl9Oqzxu729gTYt88POeIxBVnUvDCl3nQZ4z8ZsxXntBQa\n1RQMxSQLUsTCK9kWksLE6UC9EQN+v6pyAqBU6Tx94Wk4+WNI/fXtHP2qQesY\nFEOrGqkPvE39MGKCe/ajjrxZ1v6381w67Y+SctZllPMo1oqTs7kmPuv82BR1\nhKIPxMGNfM1XT+43lYphZ8FJ50KYZV0t9hX2BmhvEpJN9y/1X3Caxw++qcMV\n2dB+rMH+xsZo7+WpZr62E1yTLY4U5tKevm/yeXNQyprTlHLpfcYJqop9MpVd\ndBLz9nJOckDhDdpLrMty67NdcQU049NhEmRECyoo5wHD/XwFZF1WX5JVBNvh\nWCiV\r\n=byFb\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"globals":{},"testRegex":"(/__tests__/.*\\.(test|spec))\\.(ts|tsx|js)$","transform":{"\\.(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"modulePaths":["src"],"testEnvironment":"node","coverageDirectory":"<rootDir>/coverage","collectCoverageFrom":["src/**/*.ts"],"moduleFileExtensions":["ts","tsx","js"],"coveragePathIgnorePatterns":["/node_modules/"]},"main":"lib/index.js","readme":"# Kentico Kontent Test HTTP Service for Kontent JavaScript SDKs\n\n[![npm](https://img.shields.io/npm/v/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](https://www.npmjs.com/package/%40kentico%2Fkontent-test-http-service-js)\n[![npm](https://img.shields.io/npm/dt/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](https://www.npmjs.com/package/%40kentico%2Fkontent-test-http-service-js)\n[![npm](https://img.shields.io/npm/l/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](%40kentico%2Fkontent-test-http-service-js)\n[![Stack Overflow](https://img.shields.io/badge/Stack%20Overflow-ASK%20NOW-FE7A16.svg?logo=stackoverflow&logoColor=white)](https://stackoverflow.com/tags/kentico-kontent)\n\n[![Build Status](https://img.shields.io/travis/Kentico/kontent-test-http-service-js.svg?maxAge=1000)](https://travis-ci.com/Kentico/kontent-test-http-service-js)\n[![dependency Status](https://img.shields.io/david/Kentico/kontent-test-http-service-js.svg?maxAge=1000)](https://david-dm.org/Kentico/kontent-test-http-service-js)\n\n[![Maintainability](https://api.codeclimate.com/v1/badges/2d82fb14b450918a1778/maintainability)](https://codeclimate.com/github/Kentico/kontent-test-http-service-js/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/2d82fb14b450918a1778/test_coverage)](https://codeclimate.com/github/Kentico/kontent-test-http-service-js/test_coverage)\n\nThis is the source for the npm package called `@kentico/kontent-test-http-service-js`.\n\nThis package is meant to be used as a fake HTTP Service when testing the [Kentico Kontent Delivery SDK](https://github.com/Kentico/kontent-delivery-sdk-js) and [Kentico Kontent Management SDK](https://github.com/Kentico/kontent-management-sdk-js). It is basically an implementation of [IHttpService](https://github.com/Kentico/kontent-core-js/blob/master/lib/http/ihttp.service.ts) that could be used when [configuring the Delivery client](https://github.com/Kentico/kontent-delivery-sdk-js/blob/master/DOCS.md#client-configuration) or [configuring Management client](https://github.com/Kentico/kontent-management-sdk-js#configuration).\n\n## Install\n\nWith `npm`:\n\n```sh\nnpm install @kentico/kontent-test-http-service-js\n```\n\n## Usage\n\nThis it the example of the usage. The object `fakeResponseConfig` could contain multiple entries. An entry is chosen by matching the request url against the regular expression pattern provided as a key.\n\n> The full example is in [delivery client tests](/src/__tests__/delivery-client.test.ts).\n\n```typescript\nconst fakeResponseConfig = new Map<RegExp, FakeResponseConfig>()\nfakeResponseConfig.set(\n  // THIS IS A PATTERN THAT WOULD BE USED FOR MATCHING WHEN\n  // QUERYING THE DATA AGAINST THE URL\n  /https:\\/\\/deliver.kontent.ai\\/.*\\/items/,  \n  {\n    // HERE YOU PROVIDE YOUR FAKE RESPONSE FOR THIS PATTERN\n    fakeResponseJson: {\n      items: [\n        {\n          system: {...},\n          elements: {...}\n        }\n      ],\n      pagination: {\n        continuation_token: null,\n        next_page: null\n      }\n    },\n    throwError: false,\n    fakeHeaders: [{\n       header: 'dummy-header-name',\n       value: 'dummy value'\n       }],\n    fakeStatus: 200\n  });\n\nconst fakeHttpService =\n new KontentTestHttpService(fakeResponseConfig);\n\nconst deliveryClientConfig = {\n      projectId: 'dummyProject',\n      typeResolvers: [],\n      httpService: fakeHttpService\n    };\n\nconst client = new DeliveryClient(deliveryClientConfig)\n```\n\n## Author\n\nOndřej Chrastina — [@Simply007](https://twitter.com/Simply007)\n\n### Thanks\n\n- Author of the [typescript module boilerplate](https://github.com/jeffijoe/ts-module-boilerplate) Jeff Hansen — [@Jeffijoe](https://twitter.com/Jeffijoe)\n\n![Analytics](https://kentico-ga-beacon.azurewebsites.net/api/UA-69014260-4/Kentico/kontent-test-http-service-js?pixel)\n","engines":{"node":">=6.0.0"},"gitHead":"42a2c10705bd917d4c2d793e912a56f3edd5c02b","scripts":{"lint":"tslint --project tsconfig.json --fix \"src/**/*.ts\" && prettier --write \"src/**/*.ts\"","test":"jest","build":"rimraf lib && tsc -p tsconfig.build.json","cover":"jest --coverage --collectCoverageFrom=src/**/*.{ts,tsx} --collectCoverageFrom=!src/__tests__/**","precommit":"lint-staged","test:watch":"jest --watchAll"},"typings":"lib/index.d.ts","_npmUser":{"name":"simply007","email":"ondrej.chrastina@kentico.com"},"prettier":{"semi":false,"singleQuote":true},"repository":{"url":"git+https://github.com/Kentico/kontent-test-http-service-js.git","type":"git"},"_npmVersion":"6.12.0","description":"[![npm](https://img.shields.io/npm/v/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](https://www.npmjs.com/package/%40kentico%2Fkontent-test-http-service-js) [![npm](https://img.shields.io/npm/dt/%40kentico%2Fkontent-test-http-service-js.svg?m","directories":{"lib":"lib"},"lint-staged":{"*.ts":["tslint --fix --project tsconfig.json","prettier --write","git add"]},"_nodeVersion":"13.0.1","dependencies":{"tslib":"^1.9.3","@kentico/kontent-core":"^4.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","rxjs":"^6.5.3","husky":"^1.3.1","rimraf":"^2.6.3","tslint":"^5.12.1","ts-jest":"^23.10.5","prettier":"^1.16.4","coveralls":"^3.0.2","typescript":"^3.3.3","@types/jest":"^23.3.14","@types/node":"^10.12.23","lint-staged":"^8.1.3","tslint-config-prettier":"^1.18.0","tslint-config-standard":"^8.0.1","@kentico/kontent-delivery":"^8.0.0"},"peerDependencies":{"rxjs":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/kontent-test-http-service-js_2.1.0-beta2_1572323275608_0.39928397915250136","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"@kentico/kontent-test-http-service-js","version":"2.1.0","keywords":[],"author":{"url":"https://github.com/Simply007","name":"Ondřej Chrastina","email":"chrastina.ondra@gmail.com"},"license":"MIT","_id":"@kentico/kontent-test-http-service-js@2.1.0","maintainers":[{"name":"enngage","email":"ennspassion@gmail.com"},{"name":"janck","email":"janc@kentico.com"},{"name":"jirik","email":"jirik@kentico.com"},{"name":"kentico_tomasw","email":"tomasw@kentico.com"},{"name":"makma","email":"martinm@kentico.com"},{"name":"michalpaukert","email":"michalp2@kentico.com"},{"name":"rocky.intel","email":"rocky.intel@gmail.com"},{"name":"simply007","email":"ondrej.chrastina@kentico.com"}],"homepage":"https://github.com/Kentico/kontent-test-http-service-js#readme","bugs":{"url":"https://github.com/Kentico/kontent-test-http-service-js/issues"},"dist":{"shasum":"44bd4802fc10ce593a4c85fd8f98942982f1a4b4","tarball":"https://registry.npmjs.org/@kentico/kontent-test-http-service-js/-/kontent-test-http-service-js-2.1.0.tgz","fileCount":9,"integrity":"sha512-feVs++aC5qJVJW/tRrgxumRCpXXThtEIuAFVU/rVEvldZI8Xi0zf20tIOd1ZKpgf46TC5cPD+rk9ohGOMFByVw==","signatures":[{"sig":"MEQCID9j34aMt3HwRtMdl7QS09OgZBcDeYPZvfIZGcz1d8psAiAQlalA0jGjKuIrbClv43mlulZPMmMhRWwYWFPm+GCcDQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/JJwCRA9TVsSAnZWagAAy1AP/1TPviedOoHYKU9KO3Ee\neGKYwD0QY7vo/P2mSYomzdPpDkmZzCEEUDSzuN4rdfq478u5NB8mUndHs84+\neKxqRumVCwg7IgitZHnG82bdS8BFZwscBIWL519JO74hexwustKIxX0HcaDJ\np3jV7mMXWZTxJ5G5KYaGgdfj/P4gPT4ZwopJzbA1V46CJWdcCboDdT/SaJyo\n6dL0b3wDKov37y8m6FfX2A7Ul6FPOZv7EnwC0aG+sRsKIA/nXgYaUV5miAI4\nbBpw1MIIhfsR4Wi2gZsWttwkmAXblymUqB6oi6P1oyv5FpALa8ecm152EvOE\nE31XlcbVKET2xTq84nE2OYqkdniOswiBlPPzpr51cET5d5l/Ascw/QLwhKDi\n3GGWN+K4NvZD0yFYexSE8/GfF6S0umHM33OQE9Vg+h6AeAYbgzLZmjNACBoJ\nnSvOblabYrw+L+qnWHrHUhUr0v81ajTgZXpq0aMuXSkZd1qM48mNiwptGQgP\nAiq1x+VRfV7mNguMImOXt+mmynnOj5kdIvplpLy1nI4ViGpex6O2R/JCWfKw\n1weiV/zqtWuT15QDub4TaFwr/isViOoADq51YWQQvd0uHki6rKyzyX7oKAu3\nuM/iDb8u/8SKssI39eYgVJLYQcV3nCh6oOXPj8/nFD2sNlvET2r6024j3gh1\n4pHU\r\n=ZJRa\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"globals":{},"testRegex":"(/__tests__/.*\\.(test|spec))\\.(ts|tsx|js)$","transform":{"\\.(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"modulePaths":["src"],"testEnvironment":"node","coverageDirectory":"<rootDir>/coverage","collectCoverageFrom":["src/**/*.ts"],"moduleFileExtensions":["ts","tsx","js"],"coveragePathIgnorePatterns":["/node_modules/"]},"main":"lib/index.js","engines":{"node":">=6.0.0"},"gitHead":"1940085ca7bc5cb4b3d42c4fcdc81d6e8d4cd3a8","scripts":{"lint":"tslint --project tsconfig.json --fix \"src/**/*.ts\" && prettier --write \"src/**/*.ts\"","test":"jest","build":"rimraf lib && tsc -p tsconfig.build.json","cover":"jest --coverage --collectCoverageFrom=src/**/*.{ts,tsx} --collectCoverageFrom=!src/__tests__/**","precommit":"lint-staged","test:watch":"jest --watchAll"},"typings":"lib/index.d.ts","_npmUser":{"name":"simply007","email":"ondrej.chrastina@kentico.com"},"prettier":{"semi":false,"singleQuote":true},"deprecated":"Functionality moved to @kentico/kontent-core","repository":{"url":"git+https://github.com/Kentico/kontent-test-http-service-js.git","type":"git"},"_npmVersion":"6.13.4","description":"[![npm](https://img.shields.io/npm/v/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](https://www.npmjs.com/package/%40kentico%2Fkontent-test-http-service-js) [![npm](https://img.shields.io/npm/dt/%40kentico%2Fkontent-test-http-service-js.svg?m","directories":{"lib":"lib"},"lint-staged":{"*.ts":["tslint --fix --project tsconfig.json","prettier --write","git add"]},"_nodeVersion":"13.5.0","dependencies":{"tslib":"^1.9.3","@kentico/kontent-core":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","rxjs":"^6.5.3","husky":"^1.3.1","rimraf":"^2.6.3","tslint":"^5.12.1","ts-jest":"^23.10.5","prettier":"^1.16.4","coveralls":"^3.0.2","typescript":"^3.3.3","@types/jest":"^23.3.14","@types/node":"^10.12.23","lint-staged":"^8.1.3","tslint-config-prettier":"^1.18.0","tslint-config-standard":"^8.0.1","@kentico/kontent-delivery":"^8.0.0"},"peerDependencies":{"rxjs":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/kontent-test-http-service-js_2.1.0_1576833648148_0.757228375913535","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-10-10T16:04:01.805Z","modified":"2026-08-03T11:32:44.852Z","2.0.0-beta1":"2019-10-10T16:04:02.158Z","2.0.0-beta2":"2019-10-10T16:16:21.872Z","2.0.0":"2019-10-11T07:29:48.397Z","2.1.0-beta":"2019-10-22T08:45:17.304Z","2.1.0-beta2":"2019-10-29T04:27:55.738Z","2.1.0":"2019-12-20T09:20:48.326Z"},"bugs":{"url":"https://github.com/Kentico/kontent-test-http-service-js/issues"},"author":{"url":"https://github.com/Simply007","name":"Ondřej Chrastina","email":"chrastina.ondra@gmail.com"},"license":"MIT","homepage":"https://github.com/Kentico/kontent-test-http-service-js#readme","keywords":[],"repository":{"url":"git+https://github.com/Kentico/kontent-test-http-service-js.git","type":"git"},"description":"[![npm](https://img.shields.io/npm/v/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](https://www.npmjs.com/package/%40kentico%2Fkontent-test-http-service-js) [![npm](https://img.shields.io/npm/dt/%40kentico%2Fkontent-test-http-service-js.svg?m","maintainers":[{"email":"filips@kentico.com","name":"filipsnt"},{"email":"peterb@kentico.com","name":"peterbaltaz"},{"email":"danielsed@seznam.cz","name":"danys198"},{"email":"radek.petruska@hotmail.cz","name":"radek.petruska"}],"readme":"# Kentico Kontent Test HTTP Service for Kontent JavaScript SDKs\n\n[![npm](https://img.shields.io/npm/v/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](https://www.npmjs.com/package/%40kentico%2Fkontent-test-http-service-js)\n[![npm](https://img.shields.io/npm/dt/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](https://www.npmjs.com/package/%40kentico%2Fkontent-test-http-service-js)\n[![npm](https://img.shields.io/npm/l/%40kentico%2Fkontent-test-http-service-js.svg?maxAge=1000)](%40kentico%2Fkontent-test-http-service-js)\n[![Stack Overflow](https://img.shields.io/badge/Stack%20Overflow-ASK%20NOW-FE7A16.svg?logo=stackoverflow&logoColor=white)](https://stackoverflow.com/tags/kentico-kontent)\n\n[![Build Status](https://img.shields.io/travis/Kentico/kontent-test-http-service-js.svg?maxAge=1000)](https://travis-ci.com/Kentico/kontent-test-http-service-js)\n[![dependency Status](https://img.shields.io/david/Kentico/kontent-test-http-service-js.svg?maxAge=1000)](https://david-dm.org/Kentico/kontent-test-http-service-js)\n\n[![Maintainability](https://api.codeclimate.com/v1/badges/2d82fb14b450918a1778/maintainability)](https://codeclimate.com/github/Kentico/kontent-test-http-service-js/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/2d82fb14b450918a1778/test_coverage)](https://codeclimate.com/github/Kentico/kontent-test-http-service-js/test_coverage)\n\nThis is the source for the npm package called `@kentico/kontent-test-http-service-js`.\n\nThis package is meant to be used as a fake HTTP Service when testing the [Kentico Kontent Delivery SDK](https://github.com/Kentico/kontent-delivery-sdk-js) and [Kentico Kontent Management SDK](https://github.com/Kentico/kontent-management-sdk-js). It is basically an implementation of [IHttpService](https://github.com/Kentico/kontent-core-js/blob/master/lib/http/ihttp.service.ts) that could be used when [configuring the Delivery client](https://github.com/Kentico/kontent-delivery-sdk-js/blob/master/DOCS.md#client-configuration) or [configuring Management client](https://github.com/Kentico/kontent-management-sdk-js#configuration).\n\n## Install\n\nWith `npm`:\n\n```sh\nnpm install @kentico/kontent-test-http-service-js\n```\n\n## Usage\n\nThis it the example of the usage. The object `fakeResponseConfig` could contain multiple entries. An entry is chosen by matching the request url against the regular expression pattern provided as a key.\n\n> The full example is in [delivery client tests](/src/__tests__/delivery-client.test.ts).\n\n```typescript\nconst fakeResponseConfig = new Map<RegExp, FakeResponseConfig>()\nfakeResponseConfig.set(\n  // THIS IS A PATTERN THAT WOULD BE USED FOR MATCHING WHEN\n  // QUERYING THE DATA AGAINST THE URL\n  /https:\\/\\/deliver.kontent.ai\\/.*\\/items/,  \n  {\n    // HERE YOU PROVIDE YOUR FAKE RESPONSE FOR THIS PATTERN\n    fakeResponseJson: {\n      items: [\n        {\n          system: {...},\n          elements: {...}\n        }\n      ],\n      modular_content: {\n        ...\n      }\n      pagination: {\n        continuation_token: null,\n        next_page: null\n      }\n    },\n    throwError: false,\n    fakeHeaders: [{\n       header: 'dummy-header-name',\n       value: 'dummy value'\n       }],\n    fakeStatus: 200\n  });\n\nconst fakeHttpService =\n new KontentTestHttpService(fakeResponseConfig);\n\nconst deliveryClientConfig = {\n      projectId: 'dummyProject',\n      typeResolvers: [],\n      httpService: fakeHttpService\n    };\n\nconst client = new DeliveryClient(deliveryClientConfig)\n```\n\n## Author\n\nOndřej Chrastina — [@Simply007](https://twitter.com/Simply007)\n\n### Thanks\n\n- Author of the [typescript module boilerplate](https://github.com/jeffijoe/ts-module-boilerplate) Jeff Hansen — [@Jeffijoe](https://twitter.com/Jeffijoe)\n\n![Analytics](https://kentico-ga-beacon.azurewebsites.net/api/UA-69014260-4/Kentico/kontent-test-http-service-js?pixel)\n","readmeFilename":"README.md"}